Method: ActiveModel::Dirty#changes_applied

Defined in:
activemodel/lib/active_model/dirty.rb

#changes_appliedObject

Clears dirty data and moves changes to previous_changes and mutations_from_database to mutations_before_last_save respectively.



272
273
274
275
276
277
278
279
# File 'activemodel/lib/active_model/dirty.rb', line 272

def changes_applied
  unless defined?(@attributes)
    mutations_from_database.finalize_changes
  end
  @mutations_before_last_save = mutations_from_database
  forget_attribute_assignments
  @mutations_from_database = nil
end