From da6f5a1cb4ccabef8c5ae0cb56495c198844c4f8 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Mon, 2 Apr 2007 00:02:11 +0000 Subject: Change ActionView template defaults. Look for templates using the request format first, such as show.html.erb or show.xml.builder, before looking for the old defaults like show.erb or show.builder [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 2f7919cc07..7262472586 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1225,7 +1225,7 @@ module ActionController #:nodoc: def assert_existence_of_template_file(template_name) unless template_exists?(template_name) || ignore_missing_templates - full_template_path = @template.send(:full_template_path, template_name, 'erb') + full_template_path = @template.send(:full_template_path, template_name, "#{@template.send(:template_format)}.erb") template_type = (template_name =~ /layouts/i) ? 'layout' : 'template' raise(MissingTemplate, "Missing #{template_type} #{full_template_path}") end -- cgit v1.2.3