Module: ActiveRecord::Aggregations

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

Overview

Active Record Aggregations

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Methods included from ActiveSupport::Concern

append_features, extended, included

Instance Method Details

- (Object) clear_aggregation_cache

:nodoc:



6
7
8
9
10
# File 'activerecord/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 if self.persisted?
end