instance method
changes_applied
Ruby on Rails 5.2.8.1
Since v4.1.16Signature
changes_applied()
Clears dirty data and moves changes to previously_changed and mutations_from_database to mutations_before_last_save respectively.
Source
# File activemodel/lib/active_model/dirty.rb, line 146
def changes_applied
unless defined?(@attributes)
@previously_changed = changes
end
@mutations_before_last_save = mutations_from_database
@attributes_changed_by_setter = ActiveSupport::HashWithIndifferentAccess.new
forget_attribute_assignments
@mutations_from_database = nil
end
Defined in activemodel/lib/active_model/dirty.rb line 146
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Dirty