instance method restore_attributes

Ruby on Rails 6.0.6

Since v4.2.9

Available in: v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

restore_attributes(attr_names = changed)

Restore all previous data of the provided attributes.

Parameters

attr_names opt = 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

Type at least 2 characters to search.

↑↓ navigate · open · esc close