1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionmailer/CHANGELOG.md

55 lines
1.5 KiB
Markdown
Raw Normal View History

* Add `assert_enqueued_emails` and `assert_no_enqueued_emails`.
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.
*claudiob*
2014-12-31 10:53:36 -05:00
* Template lookup now respects default locale and I18n fallbacks.
2014-12-31 10:53:36 -05:00
Given the following templates:
2014-12-31 10:53:36 -05:00
mailer/demo.html.erb
mailer/demo.en.html.erb
mailer/demo.pt.html.erb
2014-12-31 10:53:36 -05:00
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.
2014-12-31 10:53:36 -05:00
Now `mailer/demo.en.html.erb` has precedence over the file without locale.
2014-12-31 10:53:36 -05:00
Also, it is possible to give a fallback.
2014-12-31 10:53:36 -05:00
mailer/demo.pt.html.erb
mailer/demo.pt-BR.html.erb
2014-12-31 10:53:36 -05:00
So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be rendered given
the right I18n fallback configuration.
2014-12-31 10:53:36 -05:00
*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.