diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-11-26 03:35:04 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-11-26 03:35:04 +0000 |
commit | 8afb4e136b2482e1e3826d3e00981b4b89680e1a (patch) | |
tree | 969ccf3b090efad404184a8fdbe2f2742107a65e /actionpack/lib/action_view | |
parent | 5ae821a7fe97c18101908a945de2639c8a48b7a8 (diff) | |
download | rails-8afb4e136b2482e1e3826d3e00981b4b89680e1a.tar.gz rails-8afb4e136b2482e1e3826d3e00981b4b89680e1a.tar.bz2 rails-8afb4e136b2482e1e3826d3e00981b4b89680e1a.zip |
Fix TemplateError so it doesn't bomb on exceptions while running tests [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/template_error.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/template_error.rb b/actionpack/lib/action_view/template_error.rb index f82cb31846..01b4b15550 100644 --- a/actionpack/lib/action_view/template_error.rb +++ b/actionpack/lib/action_view/template_error.rb @@ -81,9 +81,9 @@ module ActionView 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 |