Fix topics_year, topics_month, topics_week for uncategorized category

This commit is contained in:
Neil Lalonde 2013-12-13 16:16:58 -05:00
parent 3f2907a924
commit 1145e4bfd9

View File

@ -111,7 +111,7 @@ class Category < ActiveRecord::Base
topics = Topic topics = Topic
.select("COUNT(*) topic_count") .select("COUNT(*) topic_count")
.where("topics.category_id = categories.id") .where("topics.category_id = categories.id")
.where("categories.topic_id <> topics.id") .where("categories.topic_id <> topics.id OR categories.topic_id is null")
.visible .visible
topics_with_post_count = Topic topics_with_post_count = Topic