Displaying 1 result from an estimated 1 matches for "cached_total_attribute_nam".
Did you mean:
  cached_total_attribute_name
  
2006 Mar 13
1
adding custom cache field
...-#{options[:total_cache]})" +
                      " unless #{association_type}.nil?''"
                      ) 
        end
      end
    end
    class AssociationCollection
      def total
        count = if has_cached_total?
                  @owner.send(:read_attribute,cached_total_attribute_name)
                end
      end
      def has_cached_total?
        @owner.attribute_present?(cached_total_attribute_name)
      end
      def cached_total_attribute_name
          "#{@reflection.name}_total"
      end
    end
  end
end
module ActiveRecord #:nodoc:
  class Base
    class...