DEV: Remove unused method.

This commit is contained in:
Guo Xiang Tan 2019-04-04 14:19:39 +08:00
parent 588f61f717
commit 6815f777f9
2 changed files with 1 additions and 7 deletions

View File

@ -199,8 +199,8 @@ class UserNotifications < ActionMailer::Base
end
# Try to find 3 interesting stats for the top of the digest
new_topics_count = Topic.for_digest(user, min_date).count
new_topics_count = Topic.new_since_last_seen(user, min_date).count
if new_topics_count == 0
# We used topics from new users instead, so count should match
new_topics_count = topics_for_digest.size

View File

@ -423,12 +423,6 @@ class Topic < ActiveRecord::Base
topics
end
# Using the digest query, figure out what's new for a user since last seen
def self.new_since_last_seen(user, since, featured_topic_ids = nil)
topics = Topic.for_digest(user, since)
featured_topic_ids ? topics.where("topics.id NOT IN (?)", featured_topic_ids) : topics
end
def meta_data=(data)
custom_fields.replace(data)
end