Class: Bigamy::ARHasOne
Instance Attribute Summary
Attributes inherited from Proxy
#me, #methods_added, #name, #options, #primary_key
Instance Method Summary collapse
-
#initialize(parent, name, options) ⇒ ARHasOne
constructor
A new instance of ARHasOne.
Methods inherited from HasOne
#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) ⇒ ARHasOne
Returns a new instance of ARHasOne.
7 8 9 10 |
# File 'lib/bigamy/ar.rb', line 7 def initialize parent, name, super target_klass.key foreign_key end |