diff options
Diffstat (limited to 'actionmailer/CHANGELOG.md')
-rw-r--r-- | actionmailer/CHANGELOG.md | 110 |
1 files changed, 40 insertions, 70 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md index b19d6b87c0..35574a2c73 100644 --- a/actionmailer/CHANGELOG.md +++ b/actionmailer/CHANGELOG.md @@ -3,95 +3,65 @@ *Marcus Ilgner* -* `config.force_ssl = true` will set - `config.action_mailer.default_url_options = { protocol: 'https' }` - - *Andrew Kampjes* - -* Add `config.action_mailer.deliver_later_queue_name` configuration to set the - mailer queue name. - - *Chris McGrath* - -* `assert_emails` in block form use the given number as expected value. - This makes the error message much easier to understand. - - *Yuji Yaginuma* - -* Add support for inline images in mailer previews by using an interceptor - class to convert cid: urls in image src attributes to data urls. - - *Andrew White* +* Allow ActionMailer classes to configure the parameterized delivery job + Example: + ``` + class MyMailer < ApplicationMailer + self.parameterized_delivery_job = MyCustomDeliveryJob + ... + end + ``` -* Mailer preview now uses `url_for` to fix links to emails for apps running on - a subdirectory. + *Luke Pearce* - *Remo Mueller* +* `ActionDispatch::IntegrationTest` includes `ActionMailer::TestHelper` module by default. -* Mailer previews no longer crash when the `mail` method wasn't called - (`NullMail`). + *Ricardo Díaz* - Fixes #19849. +* Add `perform_deliveries` to a payload of `deliver.action_mailer` notification. - *Yves Senn* + *Yoshiyuki Kinjo* -* Make sure labels and values line up in mailer previews. +* Change delivery logging message when `perform_deliveries` is false. - *Yves Senn* + *Yoshiyuki Kinjo* -* Add `assert_enqueued_emails` and `assert_no_enqueued_emails`. +* Allow call `assert_enqueued_email_with` with no block. Example: + ``` + def test_email + ContactMailer.welcome.deliver_later + assert_enqueued_email_with ContactMailer, :welcome + end - def test_emails - assert_enqueued_emails 2 do - ContactMailer.welcome.deliver_later - ContactMailer.welcome.deliver_later - end - end - - def test_no_emails - assert_no_enqueued_emails do - # No emails enqueued here - end - end - - *George Claghorn* - -* Add `_mailer` suffix to mailers created via generator, following the same - naming convention used in controllers and jobs. - - *Carlos Souza* - -* Remove deprecate `*_path` helpers in email views. - - *Rafael Mendonça França* - -* Remove deprecated `deliver` and `deliver!` methods. + def test_email_with_arguments + ContactMailer.welcome("Hello", "Goodbye").deliver_later + assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"] + end + ``` - *claudiob* + *bogdanvlviv* -* Template lookup now respects default locale and I18n fallbacks. +* Ensure mail gem is eager autoloaded when eager load is true to prevent thread deadlocks. - Given the following templates: + *Samuel Cochran* - mailer/demo.html.erb - mailer/demo.en.html.erb - mailer/demo.pt.html.erb +* Perform email jobs in `assert_emails`. - Before this change, for a locale that doesn't have its associated file, the - `mailer/demo.html.erb` would be rendered even if `en` was the default locale. + *Gannon McGibbon* - Now `mailer/demo.en.html.erb` has precedence over the file without locale. +* Add `Base.unregister_observer`, `Base.unregister_observers`, + `Base.unregister_interceptor`, `Base.unregister_interceptors`, + `Base.unregister_preview_interceptor` and `Base.unregister_preview_interceptors`. + This makes it possible to dynamically add and remove email observers and + interceptors at runtime in the same way they're registered. - Also, it is possible to give a fallback. + *Claudio Ortolina*, *Kota Miyake* - mailer/demo.pt.html.erb - mailer/demo.pt-BR.html.erb +* Rails 6 requires Ruby 2.4.1 or newer. - So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be rendered given - the right I18n fallback configuration. + *Jeremy Daer* - *Rafael Mendonça França* -Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionmailer/CHANGELOG.md) for previous changes. +Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/actionmailer/CHANGELOG.md) for previous changes. |