Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9476 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Rendering a layout overwrites the template's status code

Reported by: lotswholetime Assigned to: nzkoz
Priority: normal Milestone: 1.x
Component: ActionPack Version: edge
Severity: normal Keywords: layout status
Cc:

Description

Changeset 7403 broke rendering a template inside a layout with a specific status code. When the template is rendered, the status code is set, however the layout is rendered with the default "200 OK" status code, overwriting the one assigned when the template was rendered. The attached patch adds a failing test for this problem, and includes a fix for problem.

Attachments

layout_with_status.diff (1.4 kB) - added by lotswholetime on 09/04/07 16:08:38.
layout_with_status.2.diff (1.4 kB) - added by lotswholetime on 09/04/07 19:03:48.
Updated patch to check template_with_options rather that the existence of options

Change History

09/04/07 16:08:38 changed by lotswholetime

  • attachment layout_with_status.diff added.

09/04/07 19:03:48 changed by lotswholetime

  • attachment layout_with_status.2.diff added.

Updated patch to check template_with_options rather that the existence of options

09/05/07 10:17:44 changed by lifofifo

+1

09/05/07 10:19:36 changed by lifofifo

  • owner changed from core to nzkoz.

09/05/07 11:14:10 changed by norbert

  • summary changed from Rendering a layout overwrites the template's status code to [PATCH] Rendering a layout overwrites the template's status code.

The patch looks good, works fine, and fixes a similar problem. +1

09/08/07 03:12:06 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [7418]) Fix layout overriding response status. Closes #9476.