method
counter_cache_column
v3.2.13 -
Show latest stable
- Class:
ActiveRecord::Reflection::AssociationReflection
counter_cache_column()public
No documentation available.
# File activerecord/lib/active_record/reflection.rb, line 223
def counter_cache_column
if options[:counter_cache] == true
"#{active_record.name.demodulize.underscore.pluralize}_count"
elsif options[:counter_cache]
options[:counter_cache].to_s
end
end 1Note
ActiveRecord::Associations::ClassMethods#belongs_to
See ActiveRecord::Associations::ClassMethods#belongs_to