Reset attributes should not report changes.
When resetting an attribute, you expect it to return to the state it was before any changes. Namely, this fixes this unexpected behavior: ~~~ruby model.name = "Bob" model.reset_name! model.name_changed? #=> true ~~~
Showing
想要评论请 注册 或 登录