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:
parent
921c3f016f
commit
fac75401ef
4 changed files with 66 additions and 35 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue