Method: ActiveEntity::AttributeMethods::Dirty#changes

Defined in:
lib/active_entity/attribute_methods/dirty.rb

#changesObject

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"] }


116
117
118
# File 'lib/active_entity/attribute_methods/dirty.rb', line 116

def changes
  mutations_from_database.changes
end