diff options
-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 |