diff options
author | Sam Stephenson <sam@37signals.com> | 2006-01-23 16:29:37 +0000 |
---|---|---|
committer | Sam Stephenson <sam@37signals.com> | 2006-01-23 16:29:37 +0000 |
commit | 4d49f2ca091319b8bc7edcddcfdadffcd5fffca8 (patch) | |
tree | 9eb683bacc2fa9b6f3839ff445b58877cbbcedf5 | |
parent | 5f44411d948f0cefb6a968a357d305c4c97c2174 (diff) | |
download | rails-4d49f2ca091319b8bc7edcddcfdadffcd5fffca8.tar.gz rails-4d49f2ca091319b8bc7edcddcfdadffcd5fffca8.tar.bz2 rails-4d49f2ca091319b8bc7edcddcfdadffcd5fffca8.zip |
Fix render(:update) to not render layouts
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/layout.rb | 1 | ||||
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index bf00979083..dc540968f0 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix render(:update) to not render layouts. [Sam Stephenson] + * Fixed that SSL would not correctly be detected when running lighttpd/fcgi behind lighttpd w/mod_proxy #3548 [stephen_purcell@yahoo.com] * Added the possibility to specify atomatic expiration for the memcachd session container #3571 [Stefan Kaes] diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb index 182a23a7d1..cc153c45a7 100644 --- a/actionpack/lib/action_controller/layout.rb +++ b/actionpack/lib/action_controller/layout.rb @@ -236,6 +236,7 @@ module ActionController #:nodoc: private def apply_layout?(template_with_options, options) + return false if options == :update template_with_options ? candidate_for_layout?(options) : !template_exempt_from_layout? end diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index 580717a655..cb42142611 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -223,7 +223,7 @@ class NewRenderTestController < ActionController::Base "render_with_explicit_template", "render_js_with_explicit_template", "render_js_with_explicit_action_template", - "delete_with_js" + "delete_with_js", "update_page" "layouts/standard" when "builder_layout_test" @@ -489,6 +489,7 @@ class NewRenderTest < Test::Unit::TestCase def test_update_page get :update_page + assert_template nil assert_equal 'text/javascript', @response.headers['Content-type'] assert_equal 2, @response.body.split($/).length end |