On Mar 6, 3:18 am, “Chris H.” [email protected] wrote:
if all you want is to check the value of a specific attribute prior to
saving, then a before_save callback should suffice.
Well, no we are getting to the interesting part…
I m in a before_save callback. how to access the new and the old value
in before_save… ?
Is that possible?
Sorry for these basic questions, I just want to make sure that I m
using the easiest way to implement it…
I ve searched already some news groups but so far it seems that
before_save has already stored the new values and no way to see the
old values by just accessing some array…
So, I ve nly seen the two possibilities:
a) store the old value in a self implemented accessor
b) request the record from the database again in before_save…
I was hoping for a c) like… well just do self[:name].old_value