From 34df9be0e5bfcae1c84d1598bbcc3679314eca28 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Sun, 29 Jan 2006 02:25:15 +0000 Subject: 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 --- actionmailer/lib/action_mailer/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer/lib') 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, -- cgit v1.2.3