Class: ActiveRecord::Reflection::AggregateReflection

Inherits:
MacroReflection show all
Defined in:
activerecord/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, #macro, #name, #options, #plural_name, #scope

Instance Method Summary collapse

Methods inherited from MacroReflection

#==, #autosave=, #class_name, #initialize, #klass

Constructor Details

This class inherits a constructor from ActiveRecord::Reflection::MacroReflection

Instance Method Details

#mappingObject

:nodoc:


169
170
171
172
# File 'activerecord/lib/active_record/reflection.rb', line 169

def mapping
  mapping = options[:mapping] || [name, name]
  mapping.first.is_a?(Array) ? mapping : [mapping]
end