Rails 6 first added the option to destroy dependencies asynchronously. It allowed cascading destroys to be offloaded into a background process for more scalable solutions.
Like all the other Rails magic, this was provided out of the box. Fortunately, a configuration option was also provided to override the default job that performs these destroys. However, that was not being adhered to!
The default job that destroys
all dependencies is
It does a great job out of the box,
there was a bug that did not allow this
job to be overridden with the provided configuration option.
Let’s look at an example.
Now when we set the
option to use
instead, it is not adhered.
Thanks to this PR it is now possible to override the default destroy association async job.