Module: ActiveRecord::Aggregations

Defined in:
activerecord/lib/active_record/aggregations.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) included(base)



3
4
5
# File 'activerecord/lib/active_record/aggregations.rb', line 3

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

- (Object) clear_aggregation_cache

:nodoc:



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

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