I try to change attribute_1
value, when I detect attribute_2
is changed and about to get updated.
The object gets updated but the set attribute_1
value is not persisting though, why?
before_update :check_attribute2_change
def check_attribute_2_change
if attribute_2_changed?
attribute_1 = nil
end
end