Commit c330e5cc8f26ffcd0380c9614e17778de6cc8091
1 parent
4ba820dd
Exists in
staging
and in
4 other branches
Fix more comments action from network tab
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
app/controllers/public/profile_controller.rb
... | ... | @@ -207,7 +207,10 @@ class ProfileController < PublicController |
207 | 207 | |
208 | 208 | def more_comments |
209 | 209 | profile_filter = @profile.person? ? {:user_id => @profile} : {:target_id => @profile} |
210 | - activity = ActionTracker::Record.find(:first, :conditions => {:id => params[:activity]}.merge(profile_filter)) | |
210 | + activity = ActionTracker::Record.where(:id => params[:activity]) | |
211 | + activity = activity.where(profile_filter) if !logged_in? || !current_person.follows?(@profile) | |
212 | + activity = activity.first | |
213 | + | |
211 | 214 | comments_count = activity.comments.count |
212 | 215 | comment_page = (params[:comment_page] || 1).to_i |
213 | 216 | comments_per_page = 5 | ... | ... |