Work in progress (up till about?)

This commit is contained in:
Robin Ward
2014-11-04 17:08:39 -05:00
parent acfd99ebf2
commit fde5e739c9
5 changed files with 47 additions and 30 deletions

View File

@ -345,8 +345,8 @@ class Topic < ActiveRecord::Base
custom_fields[key.to_s]
end
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
def self.listable_count_per_day(start_date, end_date)
listable_topics.where('created_at >= ? and created_at < ?', start_date, end_date).group('date(created_at)').order('date(created_at)').count
end
def private_message?