mirror of
https://github.com/github/rails.git
synced 2026-01-28 07:48:00 -05:00
Fix render(:update) to not render layouts
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user