public Method

Builder.compile(template)

There's no documentation for this item.

Source Code

# File action_view/template_handlers/builder.rb, line 12
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" +
  template +
  "\nxml.target!\n"
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.