method

*_previous_change

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: ActiveModel::Dirty
*_previous_change public

This method is generated for each attribute.

Returns the old and the new value of the attribute before the last save.

person = Person.new
person.name = 'Emmanuel'
person.save
person.name_previous_change # => [nil, 'Emmanuel']
Show source
Register or log in to add new notes.