Class: ActiveRecord::FixtureSet::TableRow::ReflectionProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/fixture_set/table_row.rb

Overview

:nodoc:

Direct Known Subclasses

HasManyThroughProxy

Instance Method Summary collapse

Constructor Details

#initialize(association) ⇒ ReflectionProxy

Returns a new instance of ReflectionProxy.



7
8
9
# File 'lib/active_record/fixture_set/table_row.rb', line 7

def initialize(association)
  @association = association
end

Instance Method Details

#join_tableObject



11
12
13
# File 'lib/active_record/fixture_set/table_row.rb', line 11

def join_table
  @association.join_table
end

#nameObject



15
16
17
# File 'lib/active_record/fixture_set/table_row.rb', line 15

def name
  @association.name
end

#primary_key_typeObject



19
20
21
# File 'lib/active_record/fixture_set/table_row.rb', line 19

def primary_key_type
  @association.klass.type_for_attribute(@association.klass.primary_key).type
end