aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-12-21 17:23:53 -0600
committerJoshua Peek <josh@joshpeek.com>2008-12-21 17:24:16 -0600
commit858a420ce18719c720b80508b336e37ce37a20bf (patch)
tree15c4178a13faa37476da412b738dfcc9e6398b04 /actionmailer/lib
parentf5b7f0911bc507673afe6a045176e6e3c7305d74 (diff)
downloadrails-858a420ce18719c720b80508b336e37ce37a20bf.tar.gz
rails-858a420ce18719c720b80508b336e37ce37a20bf.tar.bz2
rails-858a420ce18719c720b80508b336e37ce37a20bf.zip
Ensure the template format is always passed to the template finder. Now we can cleanup some nasty stuff.
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index f1273eb02e..c878a8d205 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -570,7 +570,9 @@ module ActionMailer #:nodoc:
end
def candidate_for_layout?(options)
- !@template.send(:_exempt_from_layout?, default_template_name)
+ !self.view_paths.find_template(default_template_name, default_template_format).exempt_from_layout?
+ rescue ActionView::MissingTemplate
+ return true
end
def template_root