From d704f8f808210171964d1822d5ffd6b227b702b2 Mon Sep 17 00:00:00 2001 From: Yves Senn <yves.senn@gmail.com> Date: Mon, 27 Apr 2015 09:38:14 +0200 Subject: mailer previews, make sure labels and values line up. While this was true before when every `dd` had a value, this patch makes sure that everything keeps lining up even when the `dd` node is blank. --- actionmailer/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionmailer') diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md index 86ecb3ee88..12867c7c9e 100644 --- a/actionmailer/CHANGELOG.md +++ b/actionmailer/CHANGELOG.md @@ -1,3 +1,7 @@ +* Make sure labels and values line up in mailer previews. + + *Yves Senn* + * Add `assert_enqueued_emails` and `assert_no_enqueued_emails`. Example: -- cgit v1.2.3 From 767d60156b89382326ce42f3ddca0cb860d38149 Mon Sep 17 00:00:00 2001 From: Yves Senn <yves.senn@gmail.com> Date: Mon, 27 Apr 2015 10:15:52 +0200 Subject: mailer previews for `NullMail` instances. Closes #19849. --- actionmailer/CHANGELOG.md | 7 +++++++ actionmailer/lib/action_mailer/base.rb | 1 + 2 files changed, 8 insertions(+) (limited to 'actionmailer') diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md index 12867c7c9e..0d47ce855a 100644 --- a/actionmailer/CHANGELOG.md +++ b/actionmailer/CHANGELOG.md @@ -1,3 +1,10 @@ +* Mailer previews no longer crash when the `mail` method wasn't called + (`NullMail`). + + Fixes #19849. + + *Yves Senn* + * Make sure labels and values line up in mailer previews. *Yves Senn* diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 754f698e48..218b7a735a 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -596,6 +596,7 @@ module ActionMailer class NullMail #:nodoc: def body; '' end + def header; {} end def respond_to?(string, include_all=false) true -- cgit v1.2.3