123456789_123456789_123456789_123456789_123456789_

Module: ActiveRecord::Aggregations

Relationships & Source Files
Namespace Children
Modules:
Defined in: activerecord/lib/active_record/aggregations.rb

Overview

See ClassMethods for documentation

Instance Method Summary

Instance Method Details

#clear_aggregation_cache (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/aggregations.rb', line 17

def clear_aggregation_cache
  @aggregation_cache.clear if persisted?
end

#init_internals (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/aggregations.rb', line 21

def init_internals
  super
  @aggregation_cache = {}
end

#initialize_dup

This method is for internal use only.
[ GitHub ]

  
# File 'activerecord/lib/active_record/aggregations.rb', line 6

def initialize_dup(*) # :nodoc:
  @aggregation_cache = @aggregation_cache.dup
  super
end

#reload

This method is for internal use only.
[ GitHub ]

  
# File 'activerecord/lib/active_record/aggregations.rb', line 11

def reload(*) # :nodoc:
  clear_aggregation_cache
  super
end