instance method
reflect_on_aggregation
Ruby on Rails 3.0.20
Since v2.2.3Signature
reflect_on_aggregation(aggregation)
Returns the AggregateReflection object for the named aggregation (use the symbol).
Account.reflect_on_aggregation(:balance) # => the balance AggregateReflection
Parameters
-
aggregationreq
Source
# File activerecord/lib/active_record/reflection.rb, line 46
def reflect_on_aggregation(aggregation)
reflections[aggregation].is_a?(AggregateReflection) ? reflections[aggregation] : nil
end
Defined in activerecord/lib/active_record/reflection.rb line 46
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Reflection::ClassMethods