Flowdock
method

attribute_before_last_save

Importance_1
v7.0.0 - 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.

This method is useful in after callbacks to get the original value of an attribute before the save that triggered the callbacks to run. It can be invoked as name_before_last_save instead of attribute_before_last_save("name").

Show source
Register or log in to add new notes.