Module: Chewy::Search::Scoping
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/chewy/search/scoping.rb
Overview
This module along with Chewy::Search provides an ability to use names scopes.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#scoping { ... } ⇒ Object
Wraps any method to make it contents be executed inside the current request scope.
Instance Method Details
#scoping { ... } ⇒ Object
Wraps any method to make it contents be executed inside the current request scope.
42 43 44 45 46 47 |
# File 'lib/chewy/search/scoping.rb', line 42 def scoping self.class.scopes.push(self) yield ensure self.class.scopes.pop end |