From 65b59f8612eae46d7b94da0607c13fd6bc3038ed Mon Sep 17 00:00:00 2001 From: Dan Neumann Date: Thu, 21 Feb 2013 21:22:02 -0600 Subject: [PATCH] make Topic consume its own scope. --- app/models/topic.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/topic.rb b/app/models/topic.rb index 4df1c928a..db8a75612 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -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)