2016-04-07 16:16:54 -04:00
|
|
|
* Disallow calling `#deliver_later` after making local modifications to
|
|
|
|
the message which would be lost when the delivery job is enqueued.
|
|
|
|
|
2016-04-10 14:15:58 -04:00
|
|
|
Prevents a common, hard-to-find bug like:
|
2016-04-07 16:16:54 -04:00
|
|
|
|
|
|
|
message = Notifier.welcome(user, foo)
|
|
|
|
message.message_id = my_generated_message_id
|
|
|
|
message.deliver_later
|
|
|
|
|
|
|
|
The message_id is silently lost! *Only the mailer arguments are passed
|
|
|
|
to the delivery job.*
|
|
|
|
|
|
|
|
This raises an exception now. Make modifications to the message within
|
|
|
|
the mailer method instead, or use a custom Active Job to manage delivery
|
|
|
|
instead of using #deliver_later.
|
|
|
|
|
|
|
|
*Jeremy Daer*
|
|
|
|
|
2016-04-05 11:40:45 -04:00
|
|
|
* Removes `-t` from default Sendmail arguments to match the underlying
|
|
|
|
`Mail::Sendmail` setting.
|
|
|
|
|
|
|
|
*Clayton Liggitt*
|
|
|
|
|
|
|
|
|
2016-02-24 11:14:40 -05:00
|
|
|
## Rails 5.0.0.beta3 (February 24, 2016) ##
|
|
|
|
|
2016-03-30 02:53:29 -04:00
|
|
|
* Add support for fragment caching in Action Mailer views.
|
2016-02-23 22:13:50 -05:00
|
|
|
|
|
|
|
*Stan Lo*
|
|
|
|
|
2016-02-08 05:47:25 -05:00
|
|
|
* Reset `ActionMailer::Base.deliveries` after every test in
|
|
|
|
`ActionDispatch::IntegrationTest`.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
|
|
|
|
2016-02-01 16:27:38 -05:00
|
|
|
## Rails 5.0.0.beta2 (February 01, 2016) ##
|
|
|
|
|
|
|
|
* No changes.
|
|
|
|
|
|
|
|
|
2015-12-18 15:58:25 -05:00
|
|
|
## Rails 5.0.0.beta1 (December 18, 2015) ##
|
|
|
|
|
2016-04-10 14:15:58 -04:00
|
|
|
* `config.action_mailer.default_url_options[:protocol]` is now set to `https` if `config.force_ssl` is set to `true`.
|
2014-10-25 06:14:05 -04:00
|
|
|
|
|
|
|
*Andrew Kampjes*
|
|
|
|
|
2015-06-03 12:28:21 -04:00
|
|
|
* Add `config.action_mailer.deliver_later_queue_name` configuration to set the
|
|
|
|
mailer queue name.
|
|
|
|
|
|
|
|
*Chris McGrath*
|
|
|
|
|
2016-04-10 14:15:58 -04:00
|
|
|
* `assert_emails` in block form, uses the given number as expected value.
|
2015-05-09 05:59:59 -04:00
|
|
|
This makes the error message much easier to understand.
|
|
|
|
|
|
|
|
*Yuji Yaginuma*
|
|
|
|
|
2015-05-04 05:43:52 -04:00
|
|
|
* 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*
|
|
|
|
|
2015-02-26 09:29:01 -05:00
|
|
|
* Mailer preview now uses `url_for` to fix links to emails for apps running on
|
|
|
|
a subdirectory.
|
|
|
|
|
|
|
|
*Remo Mueller*
|
|
|
|
|
2015-04-27 04:15:52 -04:00
|
|
|
* Mailer previews no longer crash when the `mail` method wasn't called
|
|
|
|
(`NullMail`).
|
|
|
|
|
|
|
|
Fixes #19849.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2015-04-27 03:38:14 -04:00
|
|
|
* Make sure labels and values line up in mailer previews.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2015-01-08 09:41:22 -05:00
|
|
|
* Add `assert_enqueued_emails` and `assert_no_enqueued_emails`.
|
|
|
|
|
2015-01-31 05:54:00 -05:00
|
|
|
Example:
|
|
|
|
|
2015-01-08 09:41:22 -05:00
|
|
|
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*
|
|
|
|
|
2015-01-07 04:44:56 -05:00
|
|
|
* Add `_mailer` suffix to mailers created via generator, following the same
|
|
|
|
naming convention used in controllers and jobs.
|
|
|
|
|
|
|
|
*Carlos Souza*
|
|
|
|
|
2015-12-22 07:35:34 -05:00
|
|
|
* Remove deprecated `*_path` helpers in email views.
|
2015-01-03 15:17:16 -05:00
|
|
|
|
|
|
|
*Rafael Mendonça França*
|
|
|
|
|
2015-01-02 21:01:01 -05:00
|
|
|
* 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-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
Given the following templates:
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
mailer/demo.html.erb
|
|
|
|
mailer/demo.en.html.erb
|
|
|
|
mailer/demo.pt.html.erb
|
2014-12-29 21:46:55 -05:00
|
|
|
|
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-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
Now `mailer/demo.en.html.erb` has precedence over the file without locale.
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
Also, it is possible to give a fallback.
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
mailer/demo.pt.html.erb
|
|
|
|
mailer/demo.pt-BR.html.erb
|
2014-12-29 21:46:55 -05:00
|
|
|
|
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-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
*Rafael Mendonça França*
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-11-28 12:00:06 -05:00
|
|
|
Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionmailer/CHANGELOG.md) for previous changes.
|