diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-04-27 10:15:52 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-04-28 16:00:08 +0200 |
commit | 767d60156b89382326ce42f3ddca0cb860d38149 (patch) | |
tree | a733adc3ac35b76fd84fc4cccc291bdeda2c424a /actionmailer | |
parent | d704f8f808210171964d1822d5ffd6b227b702b2 (diff) | |
download | rails-767d60156b89382326ce42f3ddca0cb860d38149.tar.gz rails-767d60156b89382326ce42f3ddca0cb860d38149.tar.bz2 rails-767d60156b89382326ce42f3ddca0cb860d38149.zip |
mailer previews for `NullMail` instances. Closes #19849.
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/CHANGELOG.md | 7 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 1 |
2 files changed, 8 insertions, 0 deletions
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 |