Method: MongoModel::Scope::FinderMethods#apply_finder_options
- Defined in:
- lib/mongomodel/support/scope/finder_methods.rb
#apply_finder_options(options = {}) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/mongomodel/support/scope/finder_methods.rb', line 49 def (={}) result = clone result = result.where([:conditions]) if [:conditions] result = result.order([:order]) if [:order] result = result.select([:select]) if [:select] result = result.limit([:limit]) if [:limit] result = result.offset([:offset]) if [:offset] result end |