Files
openfoodnetwork/app/models
Matt-Yorkley 2560757ea2 Change Enterprise after_create callback to after_create_commit
As a general rule, if you're triggering an email job as part of an after create/save callback, it should use after commit instead.

Why? The transaction can't finish until after the record is persisted (the data is committed) which includes the logic in all callbacks. So for example if the transaction fails after the email job has been placed it will be rolled back, but the email job will already be in the queue, and it'll be referencing a record that doesn't actually exist (due to the rollback).
2021-05-02 13:23:31 +01:00
..
2021-04-19 11:52:41 +02:00
2021-04-08 12:37:17 +01:00
2012-03-27 10:10:26 +11:00