Browse files

Don't rely on view instance logger

  • Loading branch information...
1 parent 42d215a commit b6f89a8bf59a0e6227c054d0be49baedf7b9f530 @josh josh committed Jul 3, 2008
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/lib/action_view/template_handlers/compilable.rb
View
8 actionpack/lib/action_view/template_handlers/compilable.rb
@@ -41,10 +41,10 @@ def compile_template(template)
file_name = template.filename || 'compiled-template'
ActionView::Base::CompiledTemplates.module_eval(render_source, file_name, -line_offset)
rescue Exception => e # errors from template code
- if @view.logger
- @view.logger.debug "ERROR: compiling #{render_symbol} RAISED #{e}"
- @view.logger.debug "Function body: #{render_source}"
- @view.logger.debug "Backtrace: #{e.backtrace.join("\n")}"
+ if Base.logger
+ Base.logger.debug "ERROR: compiling #{render_symbol} RAISED #{e}"
+ Base.logger.debug "Function body: #{render_source}"
+ Base.logger.debug "Backtrace: #{e.backtrace.join("\n")}"
end
raise ActionView::TemplateError.new(template, @view.assigns, e)

0 comments on commit b6f89a8

Please sign in to comment.