method
association_scope_cache
v7.0.0 -
Show latest stable
- Class:
ActiveRecord::Reflection::AssociationReflection
association_scope_cache(klass, owner, &block)public
No documentation available.
# File activerecord/lib/active_record/reflection.rb, line 450
def association_scope_cache(klass, owner, &block)
key = self
if polymorphic?
key = [key, owner._read_attribute(@foreign_type)]
end
klass.cached_find_by_statement(key, &block)
end