diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-04-02 00:02:11 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-04-02 00:02:11 +0000 |
commit | da6f5a1cb4ccabef8c5ae0cb56495c198844c4f8 (patch) | |
tree | 9fe9d53b953f7307e8d1840ad10b7aa738dd2688 /actionpack/lib/action_controller | |
parent | cf865196fec17d337640b4bca5cb16ca7c67f62f (diff) | |
download | rails-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-x | actionpack/lib/action_controller/base.rb | 2 |
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 |