Method: ActiveRecord::AttributeMethods::Dirty#attributes_in_database

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

#attributes_in_databaseObject

Returns a hash of the attributes that will change when the record is next saved.

The hash keys are the attribute names, and the hash values are the original attribute values in the database (as opposed to the in-memory values about to be saved).



191
192
193
# File 'lib/active_record/attribute_methods/dirty.rb', line 191

def attributes_in_database
  mutations_from_database.changed_values
end