diff options
Diffstat (limited to 'actionpack/lib')
4 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/template_handlers/builder.rb b/actionpack/lib/action_view/template_handlers/builder.rb index cff9e6beb8..f76d89777a 100644 --- a/actionpack/lib/action_view/template_handlers/builder.rb +++ b/actionpack/lib/action_view/template_handlers/builder.rb @@ -13,7 +13,7 @@ module ActionView content_type_handler = (@view.send!(:controller).respond_to?(:response) ? "controller.response" : "controller") "#{content_type_handler}.content_type ||= Mime::XML\n" + "xml = ::Builder::XmlMarkup.new(:indent => 2)\n" + - template + + template.source + "\nxml.target!\n" end diff --git a/actionpack/lib/action_view/template_handlers/compilable.rb b/actionpack/lib/action_view/template_handlers/compilable.rb index 35c74f6c51..25bd0fea7f 100644 --- a/actionpack/lib/action_view/template_handlers/compilable.rb +++ b/actionpack/lib/action_view/template_handlers/compilable.rb @@ -95,7 +95,7 @@ module ActionView # Method to create the source code for a given template. def create_template_source(template, render_symbol) - body = compile(template.source) + body = compile(template) self.template_args[render_symbol] ||= {} locals_keys = self.template_args[render_symbol].keys | template.locals.keys diff --git a/actionpack/lib/action_view/template_handlers/erb.rb b/actionpack/lib/action_view/template_handlers/erb.rb index f30cf0203c..15a9064461 100644 --- a/actionpack/lib/action_view/template_handlers/erb.rb +++ b/actionpack/lib/action_view/template_handlers/erb.rb @@ -43,7 +43,7 @@ module ActionView include Compilable def compile(template) - ::ERB.new(template, nil, @view.erb_trim_mode).src + ::ERB.new(template.source, nil, @view.erb_trim_mode).src end def cache_fragment(block, name = {}, options = nil) #:nodoc: diff --git a/actionpack/lib/action_view/template_handlers/rjs.rb b/actionpack/lib/action_view/template_handlers/rjs.rb index e0f95205de..5854e33fed 100644 --- a/actionpack/lib/action_view/template_handlers/rjs.rb +++ b/actionpack/lib/action_view/template_handlers/rjs.rb @@ -9,7 +9,7 @@ module ActionView def compile(template) "controller.response.content_type ||= Mime::JS\n" + - "update_page do |page|\n#{template}\nend" + "update_page do |page|\n#{template.source}\nend" end def cache_fragment(block, name = {}, options = nil) #:nodoc: |