Class: ActiveRecord::Reflection::AssociationReflection
- Inherits:
-
MacroReflection
- Object
- MacroReflection
- ActiveRecord::Reflection::AssociationReflection
- Defined in:
- lib/active_record/reflection.rb
Overview
Holds all the meta-data about an association as it was specified in the Active Record class.
Instance Attribute Summary
Attributes inherited from MacroReflection
Instance Method Summary collapse
-
#klass ⇒ Object
:nodoc:.
- #table_name ⇒ Object
Methods inherited from MacroReflection
#==, #initialize, #macro, #name, #options
Constructor Details
This class inherits a constructor from ActiveRecord::Reflection::MacroReflection
Instance Method Details
#klass ⇒ Object
:nodoc:
116 117 118 |
# File 'lib/active_record/reflection.rb', line 116 def klass @klass ||= active_record.send(:compute_type, (name_to_class_name(name.id2name))) end |
#table_name ⇒ Object
120 121 122 |
# File 'lib/active_record/reflection.rb', line 120 def table_name @table_name ||= klass.table_name end |