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