Do you use methods from AR::Dirty (e.g. `changed?`) in after_(create|update|save) callbacks?
-
-
Replying to @sgrif
I sometimes use it to trigger one-time background jobs (at that point it's guaranteed to be saved to the DB)
1 reply 0 retweets 0 likes -
Replying to @seanlinsley @sgrif
another example is propagating changes to an API if and only if it was successfully saved to the DB
1 reply 0 retweets 0 likes -
Replying to @seanlinsley @sgrif
I also only want to make the API request if there were specific attrs changed (skipping if unrelated attrs change)
1 reply 0 retweets 0 likes
Replying to @seanlinsley
Shouldn't all of those be in `after_commit` instead?
3:04 AM - 4 Jun 2016
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.