Dashboard: split out private messages from topic and post counts; re-enable report_spec because I think I fixed it...

This commit is contained in:
Neil Lalonde
2013-04-03 13:25:52 -04:00
parent 738789f336
commit bb18b6cb9b
12 changed files with 149 additions and 66 deletions

View File

@ -192,8 +192,8 @@ class Topic < ActiveRecord::Base
where("created_at > ?", time_ago)
end
def self.count_per_day(since=30.days.ago)
where('created_at > ?', since).group('date(created_at)').order('date(created_at)').count
def self.listable_count_per_day(sinceDaysAgo=30)
listable_topics.where('created_at > ?', sinceDaysAgo.days.ago).group('date(created_at)').order('date(created_at)').count
end
def private_message?