Module: Mongoid::Finders
- Extended by:
- Origin::Forwardable
- Defined in:
- lib/cucumber/pickle_mongodb/finders.rb
Instance Method Summary collapse
Instance Method Details
#all(fields) ⇒ Object
12 13 14 |
# File 'lib/cucumber/pickle_mongodb/finders.rb', line 12 def all(fields) where(fields[:conditions]) #returns the first instance matching given criteria end |
#first(fields) ⇒ Object
8 9 10 |
# File 'lib/cucumber/pickle_mongodb/finders.rb', line 8 def first(fields) find_by(fields[:conditions]) #returns the first instance matching given criteria end |