1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_view/template/handlers/builder.rb

18 lines
391 B
Ruby
Raw Normal View History

module ActionView
module Template::Handlers
class Builder < Template::Handler
include Compilable
self.default_format = Mime::XML
def compile(template)
require 'builder'
"xml = ::Builder::XmlMarkup.new(:indent => 2);" +
"self.output_buffer = xml.target!;" +
template.source +
2008-07-05 18:31:57 -04:00
";xml.target!;"
end
end
end
end