Method: Mongoid::Scopable::ClassMethods#default_scopable?

Defined in:
lib/mongoid/scopable.rb

#default_scopable?true, false

Is the class able to have the default scope applied?

Examples:

Can the default scope be applied?

Band.default_scopable?

Returns:

  • If the default scope can be applied.

Since:

  • 3.0.0



103
104
105
# File 'lib/mongoid/scopable.rb', line 103

def default_scopable?
  default_scoping? && !Threaded.executing?(:without_default_scope)
end