Method: Mongoid::Scopable::ClassMethods#unscoped
- Defined in:
- lib/mongoid/scopable.rb
#unscoped ⇒ Criteria | Object
Note:
This will force the default scope, as well as any scope applied using .with_scope, to be removed.
Get the criteria without any scoping applied.
177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/mongoid/scopable.rb', line 177 def unscoped if block_given? without_default_scope do with_scope(nil) do yield(self) end end else queryable.unscoped end end |