aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-04-02 00:02:11 +0000
committerRick Olson <technoweenie@gmail.com>2007-04-02 00:02:11 +0000
commitda6f5a1cb4ccabef8c5ae0cb56495c198844c4f8 (patch)
tree9fe9d53b953f7307e8d1840ad10b7aa738dd2688 /actionpack/lib/action_controller
parentcf865196fec17d337640b4bca5cb16ca7c67f62f (diff)
downloadrails-da6f5a1cb4ccabef8c5ae0cb56495c198844c4f8.tar.gz
rails-da6f5a1cb4ccabef8c5ae0cb56495c198844c4f8.tar.bz2
rails-da6f5a1cb4ccabef8c5ae0cb56495c198844c4f8.zip
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
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-xactionpack/lib/action_controller/base.rb2
1 files changed, 1 insertions, 1 deletions
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