method

counter_cache_column

rails latest stable - Class: ActiveRecord::Reflection::AssociationReflection

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.2.9) is shown here.

counter_cache_column()
public

No documentation available.

# File activerecord/lib/active_record/reflection.rb, line 346
      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

bquorning ยท Sep 11, 2009

See ActiveRecord::Associations::ClassMethods#belongs_to