Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix TemplateError so it doesn't bomb on exceptions while running test…

…s [rick]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 8afb4e136b2482e1e3826d3e00981b4b89680e1a 1 parent 5ae821a
@technoweenie technoweenie authored
View
2  actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fix TemplateError so it doesn't bomb on exceptions while running tests [rick]
+
* Fixed that named routes living under resources shouldn't have double slashes #10198 [isaacfeliu]
* Make sure that cookie sessions use a secret that is at least 30 chars in length. [Koz]
View
6 actionpack/lib/action_view/template_error.rb
@@ -81,9 +81,9 @@ def backtrace
private
def strip_base_path(path)
- File.expand_path(path).
- gsub(/^#{Regexp.escape File.expand_path(RAILS_ROOT)}/, '').
- gsub(@base_path, "")
+ stripped_path = File.expand_path(path).gsub(@base_path, "")
+ stripped_path.gsub!(/^#{Regexp.escape File.expand_path(RAILS_ROOT)}/, '') if defined?(RAILS_ROOT)
+ stripped_path
end
def source_location
Please sign in to comment.
Something went wrong with that request. Please try again.