From 5e7ffd830e559b09b0ebf5cbf6fa510f9a0cb20e Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 29 Jun 2013 21:09:13 +1000 Subject: [PATCH] hard code best requires trust level > 0, make it configurable later --- lib/topic_view.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/topic_view.rb b/lib/topic_view.rb index 2588e71a0..8310dc410 100644 --- a/lib/topic_view.rb +++ b/lib/topic_view.rb @@ -180,6 +180,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('COALESCE(users.trust_level,0) > 0') @posts = @posts.to_a @posts.sort!{|a,b| a.post_number <=> b.post_number} @posts