instance method reset_attribute!

Ruby on Rails 4.2.9

Since v3.0.20 Last seen in v4.2.9 Private

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v4.1.16 v4.2.9

Signature

reset_attribute!(attr)

Handle reset_*! for method_missing.

Parameters

attr req
Source
# File activemodel/lib/active_model/dirty.rb, line 240
      def reset_attribute!(attr)
        ActiveSupport::Deprecation.warn(<<-MSG.squish)
          `#reset_#{attr}!` is deprecated and will be removed on Rails 5.
          Please use `#restore_#{attr}!` instead.
        MSG

        restore_attribute!(attr)
      end

Defined in activemodel/lib/active_model/dirty.rb line 240 · 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