module ActiveModel::Dirty

def clear_changes_information

Clears all dirty data: current changes and previous changes.
def clear_changes_information
  @mutations_before_last_save = nil
  forget_attribute_assignments
  @mutations_from_database = nil
end