Module: Chewy::Query::Scoping

Extended by:
ActiveSupport::Concern
Included in:
Chewy::Query
Defined in:
lib/chewy/query/scoping.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#scopingObject



12
13
14
15
16
17
# File 'lib/chewy/query/scoping.rb', line 12

def scoping
  self.class.scopes.push(self)
  yield
ensure
  self.class.scopes.pop
end