Method: Mongoid::Scopable::ClassMethods#queryable
- Defined in:
- lib/mongoid/scopable.rb
#queryable ⇒ Criteria
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get a queryable, either the last one on the scope stack or a fresh one.
107 108 109 110 111 |
# File 'lib/mongoid/scopable.rb', line 107 def queryable crit = Threaded.current_scope(self) || Criteria.new(self) crit. = true if (crit.klass. && !crit.klass.cyclic?) crit end |