diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-07-05 17:31:57 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-07-05 17:31:57 -0500 |
commit | 27f382641c9ec945a1d657f5efba6a06296dca54 (patch) | |
tree | f839fcef070bb4259241f41a5136b98e64640926 /actionpack/lib/action_view/template_handlers/builder.rb | |
parent | cd6fe831526d84ae40e425cadbf22f42a375de2a (diff) | |
download | rails-27f382641c9ec945a1d657f5efba6a06296dca54.tar.gz rails-27f382641c9ec945a1d657f5efba6a06296dca54.tar.bz2 rails-27f382641c9ec945a1d657f5efba6a06296dca54.zip |
Deprecated TemplateHandler line offset
Diffstat (limited to 'actionpack/lib/action_view/template_handlers/builder.rb')
-rw-r--r-- | actionpack/lib/action_view/template_handlers/builder.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/actionpack/lib/action_view/template_handlers/builder.rb b/actionpack/lib/action_view/template_handlers/builder.rb index ee02ce1a6f..2d413490bd 100644 --- a/actionpack/lib/action_view/template_handlers/builder.rb +++ b/actionpack/lib/action_view/template_handlers/builder.rb @@ -5,17 +5,11 @@ module ActionView class Builder < TemplateHandler include Compilable - def self.line_offset - 2 - end - def compile(template) - 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" + + "controller.response.content_type ||= Mime::XML;" + + "xml = ::Builder::XmlMarkup.new(:indent => 2);" + template.source + - "\nxml.target!\n" + ";xml.target!;" end def cache_fragment(block, name = {}, options = nil) |