instiki/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb
Jacques Distler 7600aef48b Upgrade to Rails 2.2.0
As a side benefit, fix an (non-user-visible) bug in display_s5().
Also fixed a bug where removing orphaned pages did not expire cached summary pages.
2008-10-27 01:47:01 -05:00

18 lines
396 B
Ruby

require 'builder'
module ActionView
module TemplateHandlers
class Builder < TemplateHandler
include Compilable
def compile(template)
"_set_controller_content_type(Mime::XML);" +
"xml = ::Builder::XmlMarkup.new(:indent => 2);" +
"self.output_buffer = xml.target!;" +
template.source +
";xml.target!;"
end
end
end
end