remove moderator status posts from best feed

This commit is contained in:
Sam
2013-05-22 15:04:30 +10:00
parent 519bec6b04
commit c4d8085fc5
4 changed files with 11 additions and 4 deletions

View File

@ -177,6 +177,7 @@ class TopicView
@index_offset = 0
@posts = @filtered_posts.order('percent_rank asc, sort_order asc').where("post_number > 1")
@posts = @posts.includes(:reply_to_user).includes(:topic).joins(:user).limit(max)
@posts = @posts.where('posts.post_type <> ?', Post.types[:moderator_action])
@posts = @posts.to_a
@posts.sort!{|a,b| a.post_number <=> b.post_number}
@posts