Module: ActiveRecord::Aggregations

Extended by:
ActiveSupport::Concern
Defined in:
lib/active_record/aggregations.rb

Overview

Active Record Aggregations

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#clear_aggregation_cacheObject

:nodoc:



6
7
8
9
10
# File 'lib/active_record/aggregations.rb', line 6

def clear_aggregation_cache #:nodoc:
  self.class.reflect_on_all_aggregations.to_a.each do |assoc|
    instance_variable_set "@#{assoc.name}", nil
  end unless self.new_record?
end