I think you should use after_create_commit, as after_commit will get called for every update operation. If you end up updating the signup record in any situation, you might send a duplicate notification if you don't have any conditions to check whether is it a new record or not while sending notification. or use like this after_commit :do_foo_bar, on: [:create]
I'm a husband, dad, and rails dev who builds things to help businesses from the bootstrapper on up. Helping recover your business failed payments with Overdue.io.
I think you should use after_create_commit, as after_commit will get called for every update operation. If you end up updating the signup record in any situation, you might send a duplicate notification if you don't have any conditions to check whether is it a new record or not while sending notification. or use like this
after_commit :do_foo_bar, on: [:create]
Thanks. Yeah after_commit was a mistake, hence the title of my article. I swapped to after_commit_create after Ben pointed it out.