BUGFIX: make sure we only show topics that have a useful score in the Top page

This commit is contained in:
Régis Hanol
2014-01-03 01:10:17 +01:00
parent d635d888ba
commit 28bf78d801
2 changed files with 3 additions and 2 deletions

View File

@@ -88,6 +88,7 @@ class TopicQuery
score = "#{period}_score"
create_list(:top, unordered: true) do |topics|
topics.joins(:top_topic)
.where("top_topics.#{score} > 1")
.order("top_topics.#{score} DESC, topics.bumped_at DESC")
end
end