2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

category stats shouldn't include deleted topics.

This commit is contained in:
Dan Neumann 2013-02-16 14:57:16 -06:00
parent 921c3f016f
commit fac75401ef
4 changed files with 66 additions and 35 deletions

View file

@ -167,7 +167,11 @@ class Topic < ActiveRecord::Base
def self.visible
where(visible: true)
end
def self.created_since(time_ago)
where("created_at > ?", time_ago)
end
def private_message?
self.archetype == Archetype.private_message
end