diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-12-12 14:32:15 -0500 |
---|---|---|
committer | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2019-01-07 17:38:21 -0500 |
commit | e5f2d2906a395dcac0afd1abc268ca7f061765b8 (patch) | |
tree | bed6233fb6a98b1e660d7cffdbc8a84df59acd6e /railties/lib/rails | |
parent | 9cfcc067e626f0f1e220cc00a9f96622a936350d (diff) | |
download | rails-e5f2d2906a395dcac0afd1abc268ca7f061765b8.tar.gz rails-e5f2d2906a395dcac0afd1abc268ca7f061765b8.tar.bz2 rails-e5f2d2906a395dcac0afd1abc268ca7f061765b8.zip |
Move MailDeliveryJob default to 6.0 defaults
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 7dcdad2ac9..3595f60bf8 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -130,6 +130,10 @@ module Rails action_dispatch.use_cookies_with_metadata = true end + if respond_to?(:action_mailer) + action_mailer.delivery_job = "ActionMailer::MailDeliveryJob" + end + if respond_to?(:active_job) active_job.return_false_on_aborted_enqueue = true end diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt index 9914b2cf2a..a3aca27500 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt @@ -22,3 +22,12 @@ # Send Active Storage analysis and purge jobs to dedicated queues. # Rails.application.config.active_storage.queues.analysis = :active_storage_analysis # Rails.application.config.active_storage.queues.purge = :active_storage_purge + +# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail. +# +# The default delivery job (ActionMailer::DeliveryJob), will be removed in Rails 6.1. +# This setting is not backwards compatible with earlier Rails versions. +# If you send mail in the background, job workers need to have a copy of +# MailDeliveryJob to ensure all delivery jobs are processed properly. +# Make sure your entire app is migrated and stable on 6.0 before using this setting. +# Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob" |