From 77cc33b2311c347371d95e094701a0a41623d425 Mon Sep 17 00:00:00 2001 From: Henrik Nyh Date: Tue, 19 Sep 2017 08:48:50 +0100 Subject: [PATCH] 100.years.ago -> Time.at(0) A bit more robust ;) --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index 0ddedf7f17e..e4d928175d8 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -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?