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