Method: Mongoid::Criteria#context
- Defined in:
- lib/mongoid/criteria.rb
#context ⇒ Object
Return or create the context in which this criteria should be executed.
This will return an Enumerable context if the class is embedded, otherwise it will return a Mongo context for root classes.
94 95 96 |
# File 'lib/mongoid/criteria.rb', line 94 def context @context ||= Contexts.context_for(self) end |