aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/topic.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-26 12:03:25 +0100
committerJon Leighton <j@jonathanleighton.com>2012-04-26 13:29:47 +0100
commite1a83690da3dc8e72638a71cf6751986338b4596 (patch)
treef797f9319b8910ca796524416e00002eaa81389b /activerecord/test/models/topic.rb
parent519001d94093f1907b1cca3f1f385a0a9d8fec9b (diff)
downloadrails-e1a83690da3dc8e72638a71cf6751986338b4596.tar.gz
rails-e1a83690da3dc8e72638a71cf6751986338b4596.tar.bz2
rails-e1a83690da3dc8e72638a71cf6751986338b4596.zip
remove deprecated scope stuff
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r--activerecord/test/models/topic.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index 0625b8d296..ef9de9669c 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -2,7 +2,7 @@ class Topic < ActiveRecord::Base
scope :base, -> { scoped }
scope :written_before, lambda { |time|
if time
- { :conditions => ['written_on < ?', time] }
+ where 'written_on < ?', time
end
}
scope :approved, -> { where(:approved => true) }
@@ -35,18 +35,6 @@ class Topic < ActiveRecord::Base
2
end
end
- module MultipleExtensionOne
- def extension_one
- 1
- end
- end
- module MultipleExtensionTwo
- def extension_two
- 2
- end
- end
- scope :named_extension, :extend => NamedExtension
- scope :multiple_extensions, :extend => [MultipleExtensionTwo, MultipleExtensionOne]
has_many :replies, :dependent => :destroy, :foreign_key => "parent_id"
has_many :replies_with_primary_key, :class_name => "Reply", :dependent => :destroy, :primary_key => "title", :foreign_key => "parent_title"