diff options
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/base.rb | 3 | ||||
-rw-r--r-- | actionpack/test/fixtures/test/hello_world.builder | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 982d236472..c7c28fe1bf 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Return the string representation from an Xml Builder when rendering a partial. Closes #5044 [tpope] + * Fixed that parameters from XML should also be presented in a hash with indifferent access [DHH] * Tweak template format rules so that the ACCEPT header is only used if it's text/javascript. This is so ajax actions without a :format param get recognized as Mime::JS. [Rick] diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 5ae3e7ba11..519872ee85 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -526,7 +526,8 @@ module ActionView #:nodoc: when :rxml, :builder "controller.response.content_type ||= Mime::XML\n" + "xml = Builder::XmlMarkup.new(:indent => 2)\n" + - template + template + + "\nxml.target!\n" when :rjs "controller.response.content_type ||= Mime::JS\n" + "update_page do |page|\n#{template}\nend" diff --git a/actionpack/test/fixtures/test/hello_world.builder b/actionpack/test/fixtures/test/hello_world.builder index bffd2191ba..8455b11edc 100644 --- a/actionpack/test/fixtures/test/hello_world.builder +++ b/actionpack/test/fixtures/test/hello_world.builder @@ -1,3 +1,4 @@ xml.html do xml.p "Hello" -end
\ No newline at end of file +end +"String return value" |