aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/person.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/person.rb')
-rw-r--r--activerecord/test/models/person.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/models/person.rb b/activerecord/test/models/person.rb
index 84bc901b5e..b7d5dabc4f 100644
--- a/activerecord/test/models/person.rb
+++ b/activerecord/test/models/person.rb
@@ -27,8 +27,8 @@ class Person < ActiveRecord::Base
has_many :agents_posts, :through => :agents, :source => :posts
has_many :agents_posts_authors, :through => :agents_posts, :source => :author
- scope :males, :conditions => { :gender => 'M' }
- scope :females, :conditions => { :gender => 'F' }
+ scope :males, -> { where(:gender => 'M') }
+ scope :females, -> { where(:gender => 'F') }
end
class PersonWithDependentDestroyJobs < ActiveRecord::Base