Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove dead code from merge

  • Loading branch information...
commit 3fbefecc9cdc0d1a903d6ab76170223166cc69ab 1 parent 07578ac
@jeremy jeremy authored
Showing with 0 additions and 30 deletions.
  1. +0 −30 actionpack/lib/action_view/template_handlers/compilable.rb
View
30 actionpack/lib/action_view/template_handlers/compilable.rb
@@ -16,36 +16,6 @@ def render(template, local_assigns = {})
@view.send(:execute, template, local_assigns)
end
- # Compile and evaluate the template's code
- def compile_template(template)
- return false unless recompile_template?(template)
-
- @@mutex.synchronize do
- locals_code = template.locals.keys.map { |key| "#{key} = local_assigns[:#{key}];" }.join
-
- source = <<-end_src
- def #{template.method}(local_assigns)
- old_output_buffer = output_buffer;#{locals_code};#{compile(template)}
- ensure
- self.output_buffer = old_output_buffer
- end
- end_src
-
- begin
- file_name = template.filename || 'compiled-template'
- ActionView::Base::CompiledTemplates.module_eval(source, file_name, 0)
- rescue Exception => e # errors from template code
- 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)
- end
- end
- end
-
private
# Method to check whether template compilation is necessary.
# The template will be compiled if the inline template or file has not been compiled yet,
Please sign in to comment.
Something went wrong with that request. Please try again.