Method: ActiveModel::Dirty#changes
- Defined in:
- activemodel/lib/active_model/dirty.rb
#changes ⇒ Object
Returns a hash of changed attributes indicating their original and new values like attr => [original value, new value].
person.changes # => {}
person.name = 'bob'
person.changes # => { "name" => ["bill", "bob"] }
353 354 355 |
# File 'activemodel/lib/active_model/dirty.rb', line 353 def changes mutations_from_database.changes end |