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