method
attribute_before_last_save
v5.1.7 -
Show latest stable
- Class:
ActiveRecord::AttributeMethods::Dirty
attribute_before_last_save(attr_name)public
Returns the original value of an attribute before the last save. Behaves similarly to attribute_was. This method is useful in after callbacks to get the original value of an attribute before the save that just occurred