instance method
restore_attributes
Ruby on Rails 5.2.8.1
Since v4.2.9Signature
restore_attributes(attributes = changed)
Restore all previous data of the provided attributes.
Parameters
-
attributesopt = changed
Source
# File activemodel/lib/active_model/dirty.rb, line 192
def restore_attributes(attributes = changed)
attributes.each { |attr| restore_attribute! attr }
end
Defined in activemodel/lib/active_model/dirty.rb line 192
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Dirty