in a callback method of one of my Models I want to access its
attributes values before they are modified.
I tried both 'before_validation' and 'before_save', unsuccessfully: it
looks like that even before the validation get started the attributes
are already modified.
in a callback method of one of my Models I want to access its
attributes values before they are modified.
I tried both 'before_validation' and 'before_save', unsuccessfully: it
looks like that even before the validation get started the attributes
are already modified.
You'll have to either save the original values in an after_find
method, or make your own version of methods such as update_attributes,
giving you access to both the old and new values.