Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use ActionController::Base.logger to report template compilation erro…

…rs since there is no AV::Base.logger
  • Loading branch information...
commit 7dc10478e53ca4f36951c85aab4885e5de6e11cb 1 parent 4354aa3
@jeremy jeremy authored
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
@@ -37,10 +37,10 @@ def #{template.method}(local_assigns)
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)
Please sign in to comment.
Something went wrong with that request. Please try again.