From 1145e4bfd9e318d30a12a6cbc879f454df4bf784 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 13 Dec 2013 16:16:58 -0500 Subject: [PATCH] Fix topics_year, topics_month, topics_week for uncategorized category --- app/models/category.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/category.rb b/app/models/category.rb index bbd9ee655..cf639d33e 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -111,7 +111,7 @@ class Category < ActiveRecord::Base topics = Topic .select("COUNT(*) topic_count") .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 topics_with_post_count = Topic