27 lines
No EOL
940 B
Ruby
27 lines
No EOL
940 B
Ruby
#insert into users controller for feed, very much a wip
|
|
|
|
def feed
|
|
begin
|
|
#@user = User.find(params[:id])
|
|
@user = User.find_by!(login: params[:id])
|
|
@works = @user.works.visible_to_all.order('created_at DESC').limit(25)
|
|
rescue ActiveRecord::RecordNotFound
|
|
raise ActiveRecord::RecordNotFound, "Couldn't find user with id '#{params[:id]}' or no works found for them lol"
|
|
end
|
|
#@tag = @tag.merger if !@tag.canonical? && @tag.merger
|
|
# Temp for testing
|
|
# if %w(Fandom Character Relationship).include?(@tag.type.to_s) || @tag.name == 'F/F'
|
|
#$ if @tag.canonical?
|
|
# @works = @tag.filtered_works.visible_to_all.order('created_at DESC').limit(25)
|
|
# else
|
|
# @works = @tag.works.visible_to_all.order('created_at DESC').limit(25)
|
|
#end
|
|
# else
|
|
# redirect_to(tag_works_path(tag_id: @tag.to_param)) && return
|
|
#end
|
|
|
|
respond_to do |format|
|
|
|
|
format.atom
|
|
end
|
|
end |