Method: Mongoid::Scopable::ClassMethods#with_default_scope

Defined in:
lib/mongoid/scopable.rb

#with_default_scopeCriteria Also known as: criteria

Get a criteria with the default scope applied, if possible.

Examples:

Get a criteria with the default scope.

Model.with_default_scope

Returns:

Since:

  • 3.0.0



208
209
210
# File 'lib/mongoid/scopable.rb', line 208

def with_default_scope
  queryable.with_default_scope
end