Class: ActiveRecord::Reflection::AggregateReflection
- Inherits:
-
MacroReflection
- Object
- AbstractReflection
- MacroReflection
- ActiveRecord::Reflection::AggregateReflection
- Defined in:
- lib/active_record/reflection.rb
Overview
Holds all the meta-data about an aggregation as it was specified in the Active Record class.
Instance Attribute Summary
Attributes inherited from MacroReflection
#active_record, #name, #options, #plural_name, #scope
Instance Method Summary collapse
-
#mapping ⇒ Object
:nodoc:.
Methods inherited from MacroReflection
#==, #autosave=, #compute_class, #initialize, #klass
Methods inherited from AbstractReflection
#build_association, #class_name, #join_keys, #primary_key_type, #quoted_table_name, #source_macro, #table_name
Constructor Details
This class inherits a constructor from ActiveRecord::Reflection::MacroReflection
Instance Method Details
#mapping ⇒ Object
:nodoc:
245 246 247 248 |
# File 'lib/active_record/reflection.rb', line 245 def mapping mapping = [:mapping] || [name, name] mapping.first.is_a?(Array) ? mapping : [mapping] end |