Module: Chewy::Search::Scoping
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.
41 42 43 44 45 46 |
# File 'lib/chewy/search/scoping.rb', line 41 def scoping self.class.scopes.push(self) yield ensure self.class.scopes.pop end |