aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template_handlers/builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/template_handlers/builder.rb')
-rw-r--r--actionpack/lib/action_view/template_handlers/builder.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/template_handlers/builder.rb b/actionpack/lib/action_view/template_handlers/builder.rb
index 098c90f5c7..cff9e6beb8 100644
--- a/actionpack/lib/action_view/template_handlers/builder.rb
+++ b/actionpack/lib/action_view/template_handlers/builder.rb
@@ -3,18 +3,16 @@ require 'builder'
module ActionView
module TemplateHandlers
class Builder < TemplateHandler
+ include Compilable
+
def self.line_offset
2
end
- def self.compilable?
- true
- 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" +
+ "xml = ::Builder::XmlMarkup.new(:indent => 2)\n" +
template +
"\nxml.target!\n"
end