Method: Dynamoid::Dirty#changed_attributes

Defined in:
lib/dynamoid/dirty.rb

#changed_attributesObject Also known as: attributes_changed_by_setter

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


122
123
124
# File 'lib/dynamoid/dirty.rb', line 122

def changed_attributes
  @changed_attributes ||= ActiveSupport::HashWithIndifferentAccess.new
end