search for: delegate_belongs_to

Displaying 1 result from an estimated 1 matches for "delegate_belongs_to".

2011 Apr 18
1
has a field through an association
Hey guys, Trying to figure out how to do something like the following: class Child belongs_to :parent has_field :some_field, :through => :parent end class Parent has_one :child attr_accessible :some_field end child.some_field #=> parent.some_field child.some_field = value #=> sets parent.some_field = value I can of course accomplish this by adding custom accessors