instance method
scoping
Ruby on Rails 4.0.13
Since v4.0.13 Last seen in v4.2.9Signature
scoping()
We don’t want this object to be put on the scoping stack, because that could create an infinite loop where we call an @association method, which gets the current scope, which is this object, which delegates to @association, and so on.
Source
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 848
def scoping
@association.scope.scoping { yield }
end
Defined in activerecord/lib/active_record/associations/collection_proxy.rb line 848
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Associations::CollectionProxy