aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template_handlers
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/template_handlers')
-rw-r--r--actionpack/lib/action_view/template_handlers/compilable.rb8
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)