Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
调用回调:after_update后,您将丢失所有更改,因此*_changed?方法返回 false。
:after_update
*_changed?
当一个或多个属性发生更改时,我需要在更新后发送电子邮件。我怎样才能做到这一点?
如何在 before_update 上准备您的电子邮件并将其保存到实例变量中,如果更新成功(after_update)发送电子邮件?