From c0110a9faa1fc414c960a1c639aa8b121d92ca82 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Tue, 22 Jan 2008 01:46:34 +0000 Subject: Refactor template compilation from AV::Base into the template handlers. Closes #10888 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8689 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/template_handlers/erb.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_view/template_handlers/erb.rb') diff --git a/actionpack/lib/action_view/template_handlers/erb.rb b/actionpack/lib/action_view/template_handlers/erb.rb index ffc1ab0e97..3389c124eb 100644 --- a/actionpack/lib/action_view/template_handlers/erb.rb +++ b/actionpack/lib/action_view/template_handlers/erb.rb @@ -22,14 +22,12 @@ end module ActionView module TemplateHandlers class ERB < TemplateHandler + include Compilable + def compile(template) ::ERB.new(template, nil, @view.erb_trim_mode).src end - def self.compilable? - true - end - def cache_fragment(block, name = {}, options = nil) #:nodoc: @view.fragment_for(block, name, options) do eval(ActionView::Base.erb_variable, block.binding) -- cgit v1.2.3