Permalink
Browse files

Return the string representation from an Xml Builder when rendering a…

… partial. #5044 [tpope]

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@6543 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent b564d7e commit e522f75cbc31940698aae53459a777e5e6952f2c @technoweenie technoweenie committed Apr 20, 2007
Showing with 5 additions and 3 deletions.
  1. +3 −2 actionpack/lib/action_view/base.rb
  2. +2 −1 actionpack/test/fixtures/test/hello_world.rxml
@@ -455,8 +455,9 @@ def create_template_source(extension, template, render_symbol, locals)
body = case extension.to_sym
when :rxml
"controller.response.content_type ||= 'application/xml'\n" +
- "xml = Builder::XmlMarkup.new(:indent => 2)\n" +
- template
+ "xml ||= Builder::XmlMarkup.new(:indent => 2)\n" +
+ template +
+ "\nxml.target!\n"
when :rjs
"controller.response.content_type ||= 'text/javascript'\n" +
"update_page do |page|\n#{template}\nend"
@@ -1,3 +1,4 @@
xml.html do
xml.p "Hello"
-end
+end
+"String return value"

0 comments on commit e522f75

Please sign in to comment.