method

attribute_before_last_save

Importance_1
v5.1.7 - Show latest stable - 0 notes - 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

Show source
Register or log in to add new notes.