method
association_scope_cache
v7.2.3 -
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 548
def association_scope_cache(klass, owner, &block)
key = self
if polymorphic?
key = [key, owner._read_attribute(@foreign_type)]
end
klass.with_connection do |connection|
klass.cached_find_by_statement(connection, key, &block)
end
end