diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-04-20 21:44:08 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-04-20 21:44:08 +0000 |
commit | eb7a3045e3035d7de35a43297a4f36255e4f178d (patch) | |
tree | 4a159ec1ea9b7cc6af31b755e7d91d071fbd7463 /actionpack | |
parent | c87d242bf7b0f75800926c3a8cf23bb43667c9dd (diff) | |
download | rails-eb7a3045e3035d7de35a43297a4f36255e4f178d.tar.gz rails-eb7a3045e3035d7de35a43297a4f36255e4f178d.tar.bz2 rails-eb7a3045e3035d7de35a43297a4f36255e4f178d.zip |
apply [6543] to edge. Closes #5044 [tpope]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6545 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-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" |