mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
make Topic consume its own scope.
This commit is contained in:
@ -147,11 +147,11 @@ class Topic < ActiveRecord::Base
|
||||
false
|
||||
end
|
||||
|
||||
# Returns new topics since a date
|
||||
# Returns new topics since a date for display in email digest.
|
||||
def self.new_topics(since)
|
||||
Topic
|
||||
.visible
|
||||
.where("created_at >= ?", since)
|
||||
.created_since(since)
|
||||
.listable_topics
|
||||
.topic_list_order
|
||||
.includes(:user)
|
||||
|
Reference in New Issue
Block a user