method

reset_attribute!

rails latest stable - 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.

1Note

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

joshuapinter ยท Mar 22, 2018

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