instance method
reflect_on_aggregation
Ruby on Rails 7.1.6
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 69
def reflect_on_aggregation(aggregation)
aggregate_reflections[aggregation.to_s]
end
Defined in activerecord/lib/active_record/reflection.rb line 69
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Reflection::ClassMethods