aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-04-08 16:53:37 +0000
committerRick Olson <technoweenie@gmail.com>2007-04-08 16:53:37 +0000
commitbdb1fcc3b8e0293f8b099111da2302fedf4fd513 (patch)
treedf3cbc90a075f79db80452a3fe7782277a3cf962 /actionpack/lib/action_view
parent142b074e9123f477ea8f93898690fc462fdcbf90 (diff)
downloadrails-bdb1fcc3b8e0293f8b099111da2302fedf4fd513.tar.gz
rails-bdb1fcc3b8e0293f8b099111da2302fedf4fd513.tar.bz2
rails-bdb1fcc3b8e0293f8b099111da2302fedf4fd513.zip
Fix WSOD due to modification of a formatted template extension so that requests to templates like 'foo.html.erb' fail on the second hit. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6506 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/base.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 4cca763d35..584839a22e 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -252,7 +252,7 @@ module ActionView #:nodoc:
else
template_extension = pick_template_extension(template_path).to_s
template_file_name = full_template_path(template_path, template_extension)
- template_extension.gsub!(/^\w+\./, '') # strip off any formats
+ template_extension = template_extension.gsub(/^\w+\./, '') # strip off any formats
end
else
template_file_name = template_path
@@ -267,7 +267,7 @@ module ActionView #:nodoc:
e.sub_template_of(template_file_name)
raise e
else
- raise TemplateError.new(find_base_path_for("#{template_path_without_extension}.#{template_extension}"), template_file_name, @assigns, template_source, e)
+ raise TemplateError.new(find_base_path_for("#{template_path_without_extension}.#{template_extension}") || view_paths.first, template_file_name, @assigns, template_source, e)
end
end
end
@@ -582,7 +582,7 @@ module ActionView #:nodoc:
logger.debug "Backtrace: #{e.backtrace.join("\n")}"
end
- raise TemplateError.new(extract_base_path_from(file_name) || @view_paths.first, file_name || template, @assigns, template, e)
+ raise TemplateError.new(extract_base_path_from(file_name) || view_paths.first, file_name || template, @assigns, template, e)
end
@@compile_time[render_symbol] = Time.now