Module: ActiveRecord::Aggregations
- Defined in:
- lib/gems/activerecord-2.2.2/lib/active_record/aggregations.rb
Overview
:nodoc:
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#clear_aggregation_cache ⇒ Object
:nodoc:.
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/gems/activerecord-2.2.2/lib/active_record/aggregations.rb', line 3 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#clear_aggregation_cache ⇒ Object
:nodoc:
7 8 9 10 11 |
# File 'lib/gems/activerecord-2.2.2/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 |