method
changed_attributes
v4.2.1 -
Show latest stable
- Class:
ActiveModel::Dirty
changed_attributes()public
Returns a hash of the attributes with unsaved changes indicating their original values like attr => original value.
person.name # => "bob" person.name = 'robert' person.changed_attributes # => {"name" => "bob"}