Module: WithinNamedScope

Extended by:
ActiveSupport::Concern
Defined in:
lib/within_named_scope.rb,
lib/within_named_scope/version.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

VERSION =
"0.2.2"

Instance Method Summary collapse

Instance Method Details

#in_scope?(scope) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/within_named_scope.rb', line 7

def in_scope?(scope)
  !!self.class.send(scope.to_sym).exists?(self)
end