diff options
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r-- | activerecord/test/models/topic.rb | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb index 60e750e6c4..6440dbe8ab 100644 --- a/activerecord/test/models/topic.rb +++ b/activerecord/test/models/topic.rb @@ -1,20 +1,10 @@ class Topic < ActiveRecord::Base scope :base - - ActiveSupport::Deprecation.silence do - scope :written_before, lambda { |time| - if time - { :conditions => ['written_on < ?', time] } - end - } - - scope :with_object, Class.new(Struct.new(:klass)) { - def call - klass.where(:approved => true) - end - }.new(self) - end - + scope :written_before, lambda { |time| + if time + { :conditions => ['written_on < ?', time] } + end + } scope :approved, :conditions => {:approved => true} scope :rejected, :conditions => {:approved => false} @@ -29,6 +19,12 @@ class Topic < ActiveRecord::Base end end + scope :with_object, Class.new(Struct.new(:klass)) { + def call + klass.where(:approved => true) + end + }.new(self) + module NamedExtension def two 2 |