Class: ActiveRecord::Reflection::AssociationReflection

Inherits:
MacroReflection show all
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

#active_record

Instance Method Summary collapse

Methods inherited from MacroReflection

#==, #initialize, #macro, #name, #options

Constructor Details

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

Instance Method Details

#klassObject

: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_nameObject



120
121
122
# File 'lib/active_record/reflection.rb', line 120

def table_name
  @table_name ||= klass.table_name
end