instance method
set_attribute_was
Ruby on Rails 5.1.7
Since v4.2.11.3 Last seen in v5.2.8.1 Private — implementation detail, not part of the public APISignature
set_attribute_was(attr, old_value)
Force an attribute to have a particular “before” value
Parameters
-
attrreq -
old_valuereq
Source
# File activemodel/lib/active_model/dirty.rb, line 263
def set_attribute_was(attr, old_value)
attributes_changed_by_setter[attr] = old_value
end
Defined in activemodel/lib/active_model/dirty.rb line 263
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Dirty