This PR unifies the DelayedJob behavior of ActionMailer::Base and ActionMailer::Parameterized::Mailer
Now, the following syntax works equivalently:
# works currently
MyMailer.delay.my_method
# this PR makes the following work
MyMailer.with(foo: 1, bar: 2).delay.my_method
Note that ActionMailer::Parameterized::Mailer does not inherit ActionMailer::Base (moreover, the .with() method returns an object instance, hence we use include rather than extend)
Rails 5.1 introduced parameterized mailers
This PR unifies the DelayedJob behavior of ActionMailer::Base and ActionMailer::Parameterized::Mailer
Now, the following syntax works equivalently:
Note that ActionMailer::Parameterized::Mailer does not inherit ActionMailer::Base (moreover, the
.with()
method returns an object instance, hence we useinclude
rather thanextend
)