search for: table_a_chang

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

Did you mean: table_a_changed
2006 Jul 12
2
Weird problem. How to tell if an attribute has changed? Please help.
How do you tell if an foreign key attribute has been changed? For example, lets say you have a model with attribute table_a_id. Would you do this? def table_a_id=(value) if value != table_a_id @table_a_changed = true write_attribute ''table_a_id'', value end end def table_a=(value) if value != table_a @table_a_changed = true @table_a = value end end I did this and when I try to save the model I get ''undefined method updated?'...