This method is deprecated or moved on the latest stable version.
The last existing version (v4.2.9) is shown here.
has_cached_counter?(reflection = reflection())
private
Returns whether a counter cache should be used for this association.
The counter_cache option must be given on either the owner or inverse
association, and the column must be present on the owner.
# File activerecord/lib/active_record/associations/has_many_association.rb, line 88
def has_cached_counter?(reflection = reflection())
if reflection.options[:counter_cache] || (inverse = inverse_which_updates_counter_cache(reflection)) && inverse.options[:counter_cache]
owner.attribute_present?(cached_counter_attribute_name(reflection))
end
end