Hi, I m trying to link into the process of setting an belongs_to attribute in my model. Unfortunetly, it does not seem to be as easy as for "normal" attributes. I ve tried the following: class Treatment < ActiveRecord::Base belongs_to :drug def drug=(new_value) 'my stuff super new_value end However, that does not work. Ive also tried self[:drug] = new_value... However, that is also not working. Any ideas? Thanks a lot in advance. -- Volker
on 2007-06-26 17:13
on 2007-06-26 19:55
email@example.com wrote: > super new_value > end > > However, that does not work. Ive also tried self[:drug] = new_value... > However, that is also not working. http://groups.google.com/group/rubyonrails-talk/br... -- We develop, watch us RoR, in numbers too big to ignore.