From 2cad95d851ae72dadc1479ea2a21cd056dc8f06e Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Thu, 13 Oct 2005 21:58:20 +0000 Subject: Improved line number reporting for template errors git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/base.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_view/base.rb') diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index c9557fe96e..c4fb589063 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -404,10 +404,10 @@ module ActionView #:nodoc: line_offset += 2 if extension && (extension.to_sym == :rxml) begin - if file_name - CompiledTemplates.module_eval(render_source, file_name, -line_offset) + unless file_name.blank? + CompiledTemplates.module_eval(render_source, File.expand_path(file_name), -line_offset) else - CompiledTemplates.module_eval(render_source) + CompiledTemplates.module_eval(render_source, 'compiled-template', -line_offset) end rescue Object => e if logger -- cgit v1.2.3