Ruby on Rails latest stable (v6.1.7.7) - 1 note - Class: ActiveModel::Dirty

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.2.9) is shown here.

reset_attribute!(attr) private

Handle reset_*! for method_missing.

Show source
Register or log in to add new notes.
March 22, 2018
0 thanks

Each attribute has a `reset_<attribute>!` method on it as well.

So if the attribute is name you can call reset_name! on the object to reset the dirty changes.