method

*_previously_was

Importance_1
v7.2.3 - Show latest stable - 0 notes - Class: ActiveModel::Dirty
*_previously_was public

This method is generated for each attribute.

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

person = Person.new
person.name = 'Sage'
person.save
person.name_previously_was  # => nil
Show source
Register or log in to add new notes.