Changeset 7418
- Timestamp:
- 09/08/07 03:12:03 (1 year ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/layout.rb (modified) (1 diff)
- trunk/actionpack/test/controller/layout_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r7413 r7418 1 1 *SVN* 2 3 * Fix layout overriding response status. #9476 [lotswholetime] 2 4 3 5 * Add fieldset_tag for generating fieldsets, closes #9477. [djanowski] trunk/actionpack/lib/action_controller/layout.rb
r7403 r7418 248 248 @template.instance_variable_set("@content_for_layout", content_for_layout) 249 249 response.layout = layout 250 render_for_text(@template.render_file(layout, true)) 250 status = template_with_options ? options[:status] : nil 251 render_for_text(@template.render_file(layout, true), status) 251 252 else 252 253 render_with_no_layout(options, &block) trunk/actionpack/test/controller/layout_test.rb
r6736 r7418 201 201 end 202 202 end 203 204 class LayoutStatusIsRendered < LayoutTest 205 def hello 206 render :status => 401 207 end 208 end 209 210 class LayoutStatusIsRenderedTest < Test::Unit::TestCase 211 def setup 212 @request = ActionController::TestRequest.new 213 @response = ActionController::TestResponse.new 214 end 215 216 def test_layout_status_is_rendered 217 @controller = LayoutStatusIsRendered.new 218 get :hello 219 assert_response 401 220 end 221 end