I am having difficulties accessing parent properties/attributes from
the child. Anyone could shed some lights onto this?
Heres a sample code:
class Parent < ActiveRecord::Base
:has_many => :childs
@connector = 'some connector object'
self.childs << Child.new
self.childs[count].connector = @connector
class Child < ActiveRecord::Base
:belongs_to => :parent
# code goes here to access @connector
The above is just a recreation of what I am looking to do. So
basically I want to be able to access objects like the connector from
the child, or even the parent itself by something like