Sha256: d46751f4a4bfea88ba0f429a7dbd590031ea42b2dbb482dd6f19686c6f9ef827

Contents?: true

Size: 396 Bytes

Versions: 73

Compression:

Stored size: 396 Bytes

Contents

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

Version data entries

73 entries across 70 versions & 14 rubygems

Version Path
actionpack-2.3.18 lib/action_view/template_handlers/builder.rb
actionpack_csi-2.3.5.p8 lib/action_view/template_handlers/builder.rb
actionpack-2.3.17-rack-upgrade-2.3.17 lib/action_view/template_handlers/builder.rb
actionpack-2.3.17 lib/action_view/template_handlers/builder.rb
actionpack_csi-2.3.5.p7 lib/action_view/template_handlers/builder.rb
actionpack_csi-2.3.5.p6 lib/action_view/template_handlers/builder.rb
actionpack-2.3.16 lib/action_view/template_handlers/builder.rb
actionpack-rack-upgrade-2-2.3.16 lib/action_view/template_handlers/builder.rb
actionpack-rack-upgrade-2-2.3.15 lib/action_view/template_handlers/builder.rb
actionpack-2.3.15 lib/action_view/template_handlers/builder.rb
actionpack-rack-upgrade-2.3.16 lib/action_view/template_handlers/builder.rb
actionpack-rack-upgrade-2.3.15 lib/action_view/template_handlers/builder.rb
actionpack-rack-upgrade-2.3.14 lib/action_view/template_handlers/builder.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/actionpack-2.3.14/lib/action_view/template_handlers/builder.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/actionpack-2.3.12/lib/action_view/template_handlers/builder.rb
actionpack-2.3.14 lib/action_view/template_handlers/builder.rb
kajam-1.0.3.rc2 vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb
actionpack-2.3.12 lib/action_view/template_handlers/builder.rb
radiant-1.0.0.rc2 vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb
radiant-1.0.0.rc1 vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb