Merge pull request #5195 from henrik/patch-1

100.years.ago -> Time.at(0)
This commit is contained in:
Guo Xiang Tan 2017-09-28 15:47:06 +08:00 committed by GitHub
commit 30fa5379ce
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class Post < ActiveRecord::Base
scope :for_mailing_list, ->(user, since) {
q = created_since(since)
.joins(:topic)
.where(topic: Topic.for_digest(user, 100.years.ago)) # we want all topics with new content, regardless when they were created
.where(topic: Topic.for_digest(user, Time.at(0))) # we want all topics with new content, regardless when they were created
q = q.where.not(post_type: Post.types[:whisper]) unless user.staff?