diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2005-10-16 18:37:11 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2005-10-16 18:37:11 +0000 |
commit | 46f76ea549cdf75cc43b9e16a9e571b787968c10 (patch) | |
tree | 7e256b3f374a03dc6526962e3ffee4748f039c8f /actionpack/lib/action_view | |
parent | 57f43473d73906232340ccbb6b4651dfd99bc1eb (diff) | |
download | rails-46f76ea549cdf75cc43b9e16a9e571b787968c10.tar.gz rails-46f76ea549cdf75cc43b9e16a9e571b787968c10.tar.bz2 rails-46f76ea549cdf75cc43b9e16a9e571b787968c10.zip |
Improve line number detection for template errors
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/template_error.rb | 2 |
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 |