method
with_cache_name
v4.2.7 -
Show latest stable
- Class:
ActiveRecord::Associations::BelongsToAssociation
with_cache_name()private
No documentation available.
# File activerecord/lib/active_record/associations/belongs_to_association.rb, line 48
def with_cache_name
counter_cache_name = reflection.counter_cache_column
return unless counter_cache_name && owner.persisted?
yield counter_cache_name
end