Method: Mongoid::Scopable::ClassMethods#unscoped
- Defined in:
- lib/mongoid/scopable.rb
#unscoped ⇒ Criteria, Object
Note:
This will force the default scope to be removed.
Get the criteria without the default scoping applied.
190 191 192 193 194 195 196 197 198 |
# File 'lib/mongoid/scopable.rb', line 190 def unscoped if block_given? without_default_scope do yield(self) end else queryable.unscoped end end |