aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorGannon McGibbon <gannon.mcgibbon@gmail.com>2018-12-12 14:32:15 -0500
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2019-01-07 17:38:21 -0500
commite5f2d2906a395dcac0afd1abc268ca7f061765b8 (patch)
treebed6233fb6a98b1e660d7cffdbc8a84df59acd6e /actionmailer/lib
parent9cfcc067e626f0f1e220cc00a9f96622a936350d (diff)
downloadrails-e5f2d2906a395dcac0afd1abc268ca7f061765b8.tar.gz
rails-e5f2d2906a395dcac0afd1abc268ca7f061765b8.tar.bz2
rails-e5f2d2906a395dcac0afd1abc268ca7f061765b8.zip
Move MailDeliveryJob default to 6.0 defaults
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb2
-rw-r--r--actionmailer/lib/action_mailer/railtie.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 650dd8bbda..5610212fad 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -461,7 +461,7 @@ module ActionMailer
helper ActionMailer::MailHelper
- class_attribute :delivery_job, default: ::ActionMailer::MailDeliveryJob
+ class_attribute :delivery_job, default: ::ActionMailer::DeliveryJob
class_attribute :default_params, default: {
mime_version: "1.0",
charset: "UTF-8",
diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb
index bb6141b406..23488db790 100644
--- a/actionmailer/lib/action_mailer/railtie.rb
+++ b/actionmailer/lib/action_mailer/railtie.rb
@@ -46,6 +46,10 @@ module ActionMailer
register_preview_interceptors(options.delete(:preview_interceptors))
register_observers(options.delete(:observers))
+ if delivery_job = options.delete(:delivery_job)
+ self.delivery_job = delivery_job.constantize
+ end
+
options.each { |k, v| send("#{k}=", v) }
end