Class: Bigamy::ARHasMany

Inherits:
HasMany show all
Defined in:
lib/bigamy/ar.rb

Instance Attribute Summary

Attributes inherited from Proxy

#me, #methods_added, #name, #options, #primary_key

Instance Method Summary collapse

Methods inherited from HasMany

#add_getter, #add_setter, #foreign_key

Methods inherited from Proxy

#add_getter, #add_setter, #create_accessors, #divorce_everyone, #foreign_key, #root_klass, #root_klass_name, #serialize_foreign_key, #target_klass, #target_klass_name

Constructor Details

#initialize(parent, name, options) ⇒ ARHasMany

Returns a new instance of ARHasMany.



14
15
16
17
# File 'lib/bigamy/ar.rb', line 14

def initialize parent, name, options
  super
  target_klass.key foreign_key
end