diff options
Diffstat (limited to 'actionpack/lib')
-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 |