features/step_definitions/documents.rb in mongodoc-0.2.2 vs features/step_definitions/documents.rb in mongodoc-0.2.4
- old
+ new
@@ -22,9 +22,9 @@
key :type
key :note
key :interests
has_many :addresses
- named_scope :rubyists, :in => {:interests => ['ruby']}
- named_scope :contract_work, :in => {:interests => ['contract work']}
- named_scope :in_state, lambda {|state| { :where => {'addresses.state' => state}}}
+ scope :rubyists, any_in(:interests => ['ruby'])
+ scope :contract_work, any_in(:interests => ['contract work'])
+ scope :in_state, lambda {|state| where('addresses.state' => state)}
end