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.
169 170 171 |
# File 'lib/mongoid/criteria.rb', line 169 def scoped { :where => @selector }.merge(@options) end |