instance method
reflect_on_aggregation
Ruby on Rails 4.0.13
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 42
def reflect_on_aggregation(aggregation)
reflection = reflections[aggregation]
reflection if reflection.is_a?(AggregateReflection)
end
Defined in activerecord/lib/active_record/reflection.rb line 42
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Reflection::ClassMethods