diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-07 12:42:51 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-09 10:42:29 -0700 |
commit | 7dc10478e53ca4f36951c85aab4885e5de6e11cb (patch) | |
tree | 5b31fe9b14a724e38112cab4768fbbb78ad971ed /actionpack/lib/action_view/template_handlers/compilable.rb | |
parent | 4354aa36fb0b94f3750256441054d42db9900bf5 (diff) | |
download | rails-7dc10478e53ca4f36951c85aab4885e5de6e11cb.tar.gz rails-7dc10478e53ca4f36951c85aab4885e5de6e11cb.tar.bz2 rails-7dc10478e53ca4f36951c85aab4885e5de6e11cb.zip |
Use ActionController::Base.logger to report template compilation errors since there is no AV::Base.logger
Diffstat (limited to 'actionpack/lib/action_view/template_handlers/compilable.rb')
-rw-r--r-- | actionpack/lib/action_view/template_handlers/compilable.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/template_handlers/compilable.rb b/actionpack/lib/action_view/template_handlers/compilable.rb index 256d8da031..9b9255579c 100644 --- a/actionpack/lib/action_view/template_handlers/compilable.rb +++ b/actionpack/lib/action_view/template_handlers/compilable.rb @@ -37,10 +37,10 @@ module ActionView file_name = template.filename || 'compiled-template' ActionView::Base::CompiledTemplates.module_eval(source, file_name, 0) rescue Exception => e # errors from template code - if Base.logger - Base.logger.debug "ERROR: compiling #{template.method} RAISED #{e}" - Base.logger.debug "Function body: #{source}" - Base.logger.debug "Backtrace: #{e.backtrace.join("\n")}" + if logger = ActionController::Base.logger + logger.debug "ERROR: compiling #{template.method} RAISED #{e}" + logger.debug "Function body: #{source}" + logger.debug "Backtrace: #{e.backtrace.join("\n")}" end raise ActionView::TemplateError.new(template, @view.assigns, e) |