Make error reporting work with Rails 2.0.{0,1}
This commit is contained in:
parent
14882b839e
commit
b3c4658fde
|
@ -42,7 +42,14 @@ module ActionView
|
|||
logger.debug "Backtrace: #{e.backtrace.join("\n")}"
|
||||
end
|
||||
|
||||
raise TemplateError.new(@base_path, file_name || template, @assigns, template, e)
|
||||
base_path = if defined?(extract_base_path_from)
|
||||
# Rails 2.0.x
|
||||
extract_base_path_from(file_name) || view_paths.first
|
||||
else
|
||||
# Rails <=1.2.6
|
||||
@base_path
|
||||
end
|
||||
raise ActionView::TemplateError.new(base_path, file_name || template, @assigns, template, e)
|
||||
end
|
||||
|
||||
@@compile_time[render_symbol] = Time.now
|
||||
|
|
Loading…
Reference in New Issue