method

saved_change_to_attribute

Importance_1
v5.2.3 - Show latest stable - 0 notes - Class: ActiveRecord::AttributeMethods::Dirty
saved_change_to_attribute(attr_name) public

Returns the change to an attribute during the last save. If the attribute was changed, the result will be an array containing the original value and the saved value.

Behaves similarly to attribute_change. This method is useful in after callbacks, to see the change in an attribute that just occurred

This method can be invoked as saved_change_to_name in instead of saved_change_to_attribute("name")

Show source
Register or log in to add new notes.