diff options
author | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-21 19:04:39 +0200 |
---|---|---|
committer | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-21 19:04:39 +0200 |
commit | aad429a46e3017fa7ca73f58428693e821be42b6 (patch) | |
tree | f749e0cdeab20c7f4be37ff49e064705f17cdfa5 /actionmailer/lib/action_mailer/base.rb | |
parent | cf6840773b4f5046151f4d28c286069aabaafa10 (diff) | |
parent | 8622787f8748434b4ceb2b925a35b17a38e1f2d6 (diff) | |
download | rails-aad429a46e3017fa7ca73f58428693e821be42b6.tar.gz rails-aad429a46e3017fa7ca73f58428693e821be42b6.tar.bz2 rails-aad429a46e3017fa7ca73f58428693e821be42b6.zip |
Merge branch 'master' into i18n
Diffstat (limited to 'actionmailer/lib/action_mailer/base.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 1583fb4066..72c94529b5 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -470,8 +470,9 @@ module ActionMailer #:nodoc: # also render a "normal" template (without the content type). If a # normal template exists (or if there were no implicit parts) we render # it. - template = template_root["#{mailer_name}/#{@template}"] - @body = render_message(@template, @body) if template + template_exists = @parts.empty? + template_exists ||= template_root["#{mailer_name}/#{@template}"] + @body = render_message(@template, @body) if template_exists # Finally, if there are other message parts and a textual body exists, # we shift it onto the front of the parts and set the body to nil (so |