Commit 0c0fadaa7a7a13626d7d2ad0b2744b1050743bcc

Authored by Victor Costa
1 parent 733087eb

Fix comment pagination in profile wall

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
app/controllers/public/profile_controller.rb
... ... @@ -202,7 +202,8 @@ class ProfileController < PublicController
202 202 end
203 203  
204 204 def more_comments
205   - activity = ActionTracker::Record.find(:first, :conditions => {:id => params[:activity], :user_id => @profile})
  205 + profile_filter = @profile.person? ? {:user_id => @profile} : {:target_id => @profile}
  206 + activity = ActionTracker::Record.find(:first, :conditions => {:id => params[:activity]}.merge(profile_filter))
206 207 comments_count = activity.comments.count
207 208 comment_page = (params[:comment_page] || 1).to_i
208 209 comments_per_page = 5
... ...