diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/delayed_delivery_job.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/delayed_delivery_job.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/delayed_delivery_job.rb b/actionmailer/lib/action_mailer/delayed_delivery_job.rb new file mode 100644 index 0000000000..159198829f --- /dev/null +++ b/actionmailer/lib/action_mailer/delayed_delivery_job.rb @@ -0,0 +1,11 @@ +require 'active_job' + +module ActionMailer + class DelayedDeliveryJob < ActiveJob::Base + queue_as :mailers + + def perform(mailer, mail_method, delivery_method, *args) + mailer.constantize.send(mail_method, *args).send(delivery_method) + end + end +end |