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 /railties/lib/rails/templates | |
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 'railties/lib/rails/templates')
-rw-r--r-- | railties/lib/rails/templates/rails/mailers/email.html.erb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/railties/lib/rails/templates/rails/mailers/email.html.erb b/railties/lib/rails/templates/rails/mailers/email.html.erb index cce818d103..afca6368d5 100644 --- a/railties/lib/rails/templates/rails/mailers/email.html.erb +++ b/railties/lib/rails/templates/rails/mailers/email.html.erb @@ -103,7 +103,14 @@ </dl> </header> -<iframe seamless name="messageBody" src="?part=<%= Rack::Utils.escape(@part.mime_type) %>"></iframe> +<% if @part.mime_type %> + <iframe seamless name="messageBody" src="?part=<%= Rack::Utils.escape(@part.mime_type) %>"></iframe> +<% else %> + <p> + You are trying to preview an email that does not have any content. + This is probably because the <em>mail</em> method has not been called in <em><%= @preview.preview_name %>#<%= @email_action %></em>. + </p> +<% end %> </body> </html> |