diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb new file mode 100644 index 0000000..66a07b2 --- /dev/null +++ b/app/controllers/users_controller.rb @@ -0,0 +1,27 @@ +#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 \ No newline at end of file