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?
1 つ以上の属性が変更されたときに、更新後にメールを送信する必要があります。これどうやってするの?
before_update でメールを準備してインスタンス変数に保存し、更新が成功した場合 (after_update) にメールを送信するのはどうですか?