aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template_error.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/template_error.rb')
-rw-r--r--actionpack/lib/action_view/template_error.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template_error.rb b/actionpack/lib/action_view/template_error.rb
index 9f7fc416c9..b81173dafe 100644
--- a/actionpack/lib/action_view/template_error.rb
+++ b/actionpack/lib/action_view/template_error.rb
@@ -47,7 +47,7 @@ module ActionView
def line_number
if file_name
- regexp = /#{Regexp.escape file_name}:(\d+)\s*$/
+ regexp = /#{Regexp.escape File.basename(file_name)}:(\d+)\s*$/
[@original_exception.message, @original_exception.clean_backtrace].flatten.each do |line|
return $1.to_i if regexp =~ line
end