diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 5da51b5..8577d75 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -207,7 +207,10 @@ class ProfileController < PublicController def more_comments profile_filter = @profile.person? ? {:user_id => @profile} : {:target_id => @profile} - activity = ActionTracker::Record.find(:first, :conditions => {:id => params[:activity]}.merge(profile_filter)) + activity = ActionTracker::Record.where(:id => params[:activity]) + activity = activity.where(profile_filter) if !logged_in? || !current_person.follows?(@profile) + activity = activity.first + comments_count = activity.comments.count comment_page = (params[:comment_page] || 1).to_i comments_per_page = 5 -- libgit2 0.21.2