Method: ActiveRecord::Reflection::ClassMethods#reflect_on_aggregation
- Defined in:
- lib/ocean-dynamo/active_record_stuff/reflection.rb
#reflect_on_aggregation(aggregation) ⇒ Object
Returns the AggregateReflection object for the named aggregation (use the symbol).
Account.reflect_on_aggregation(:balance) # => the balance AggregateReflection
42 43 44 45 |
# File 'lib/ocean-dynamo/active_record_stuff/reflection.rb', line 42 def reflect_on_aggregation(aggregation) reflection = reflections[aggregation] reflection if reflection.is_a?(AggregateReflection) end |