Method: Mongoid::Criteria#scoped
- Defined in:
- lib/mongoid/criteria.rb
#scoped ⇒ Object
Returns the selector and options as a Hash that would be passed to a scope for use with named scopes.
180 181 182 |
# File 'lib/mongoid/criteria.rb', line 180 def scoped { :where => @selector }.merge(@options) end |