Module: NoBrainer::Criteria::Scope
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/no_brainer/criteria/scope.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
14
15
16
17
|
# File 'lib/no_brainer/criteria/scope.rb', line 14
def method_missing(name, *args, &block)
return super unless self.model.respond_to?(name)
apply_named_scope(name, args, block)
end
|
Instance Method Details
#respond_to?(name, include_private = false) ⇒ Boolean
10
11
12
|
# File 'lib/no_brainer/criteria/scope.rb', line 10
def respond_to?(name, include_private = false)
super || self.model.respond_to?(name)
end
|
#unscoped ⇒ Object
6
7
8
|
# File 'lib/no_brainer/criteria/scope.rb', line 6
def unscoped
chain(:use_default_scope => false)
end
|