Flowdock
method

counter_cache_column

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: AbstractReflection
counter_cache_column() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/reflection.rb, line 219
      def counter_cache_column
        if belongs_to?
          if options[:counter_cache] == true
            "#{active_record.name.demodulize.underscore.pluralize}_count"
          elsif options[:counter_cache]
            options[:counter_cache].to_s
          end
        else
          options[:counter_cache] ? options[:counter_cache].to_s : "#{name}_count"
        end
      end
Register or log in to add new notes.