make sure we only count regular posts when calculating Top score

This commit is contained in:
Régis Hanol 2014-01-03 16:56:03 +01:00
parent 0b5265de17
commit 2cecc0b21f
1 changed files with 1 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class TopTopic < ActiveRecord::Base
WHERE p.created_at >= :from
AND p.deleted_at IS NULL
AND NOT p.hidden
AND post_type = #{Post.types[:regular]}
GROUP BY topic_id"
TopTopic.update_top_topics(period, "posts", sql)