diff options
author | Jamis Buck <jamis@37signals.com> | 2006-01-29 02:25:15 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-01-29 02:25:15 +0000 |
commit | 34df9be0e5bfcae1c84d1598bbcc3679314eca28 (patch) | |
tree | 00129e14b896636253e9d90f7e48d4d5b1c5857e /actionmailer/lib/action_mailer | |
parent | 01b1a8772928fbf31180341356981b95d0581413 (diff) | |
download | rails-34df9be0e5bfcae1c84d1598bbcc3679314eca28.tar.gz rails-34df9be0e5bfcae1c84d1598bbcc3679314eca28.tar.bz2 rails-34df9be0e5bfcae1c84d1598bbcc3679314eca28.zip |
Template paths with dot chars in them no longer mess up implicit template selection for multipart messages (closes #3332)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3495 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 39fa1e4aac..97bd83395c 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -305,7 +305,7 @@ module ActionMailer # normal template exists (or if there were no implicit parts) we render # it. template_exists = @parts.empty? - template_exists ||= Dir.glob("#{template_path}/#{@template}.*").any? { |i| i.split(".").length == 2 } + template_exists ||= Dir.glob("#{template_path}/#{@template}.*").any? { |i| File.basename(i).split(".").length == 2 } @body = render_message(@template, @body) if template_exists # Finally, if there are other message parts and a textual body exists, |