instance method attribute_was

Ruby on Rails 3.1.12

Since v3.0.20 Private — implementation detail, not part of the public API

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

attribute_was(attr)

Handle *_was for method_missing.

Parameters

attr req
Source
# File activemodel/lib/active_model/dirty.rb, line 147
      def attribute_was(attr)
        attribute_changed?(attr) ? changed_attributes[attr] : __send__(attr)
      end

Defined in activemodel/lib/active_model/dirty.rb line 147 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::Dirty

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close