I am working on a functionality where i need to trigger a mail to a list of users once the record field value has been updated successfully.
For eg: I have a Blog model which has published attribute(represents a column in my database table) with default value as false. When the user published the blog, the field value will become true and i need to send some mails.
- Which is the best way of doing it?
- If I can use after_update callback, how will i get to know that published column has been updated during the last update call?
- Is there a way to access the old value of the published attribute after the update?
Any help is highly appreciated...