diff options
Diffstat (limited to 'actionmailer/CHANGELOG.md')
-rw-r--r-- | actionmailer/CHANGELOG.md | 65 |
1 files changed, 40 insertions, 25 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md index 1867a392eb..008760f2fc 100644 --- a/actionmailer/CHANGELOG.md +++ b/actionmailer/CHANGELOG.md @@ -1,39 +1,54 @@ -* Add mailer previews feature based on 37 Signals mail_view gem +* Add `assert_enqueued_emails` and `assert_no_enqueued_emails`. - *Andrew White* + def test_emails + assert_enqueued_emails 2 do + ContactMailer.welcome.deliver_later + ContactMailer.welcome.deliver_later + end + end -* Calling `mail()` without arguments serves as getter for the current mail - message and keeps previously set headers. + def test_no_emails + assert_no_enqueued_emails do + # No emails enqueued here + end + end - Fixes #13090. + *George Claghorn* - Example: +* Add `_mailer` suffix to mailers created via generator, following the same + naming convention used in controllers and jobs. - class MailerWithCallback < ActionMailer::Base - after_action :a_callback + *Carlos Souza* - def welcome - mail subject: "subject", to: ["joe@example.com"] - end +* Remove deprecate `*_path` helpers in email views. - def a_callback - mail # => returns the current mail message - end - end + *Rafael Mendonça França* + +* Remove deprecated `deliver` and `deliver!` methods. + + *claudiob* + +* Template lookup now respects default locale and I18n fallbacks. + + Given the following templates: + + mailer/demo.html.erb + mailer/demo.en.html.erb + mailer/demo.pt.html.erb - *Yves Senn* + 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. -* Instrument the generation of Action Mailer messages. The time it takes to - generate a message is written to the log. + Now `mailer/demo.en.html.erb` has precedence over the file without locale. - *Daniel Schierbeck* + Also, it is possible to give a fallback. -* Invoke mailer defaults as procs only if they are procs, do not convert with - `to_proc`. That an object is convertible to a proc does not mean it's meant - to be always used as a proc. + mailer/demo.pt.html.erb + mailer/demo.pt-BR.html.erb - Fixes #11533. + So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be rendered given + the right I18n fallback configuration. - *Alex Tsukernik* + *Rafael Mendonça França* -Please check [4-0-stable](https://github.com/rails/rails/blob/4-0-stable/actionmailer/CHANGELOG.md) for previous changes. +Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionmailer/CHANGELOG.md) for previous changes. |