This project is archived and is in readonly mode.
render_to_string :inline before normal render causes assert_template failures
Reported by Luke Melia | November 16th, 2008 @ 05:09 AM | in 2.x
When render_to_string :inline => ... is called in a controller action a normal template render later occurs, the response.template's @_first_render variable is set to an instance of InlineTemplate rather than the file-based template that was rendered and returned in the response.
The attached patch causes render_to_string to reset @_first_render to nil when it is set to an InlineTemplate.
This caused failures in my application test suite upon upgrading to the 2.2 branch.
Comments and changes to this ticket
-
DHH November 16th, 2008 @ 08:43 PM
- Assigned user set to josh
-
Repository November 18th, 2008 @ 04:11 AM
- State changed from new to resolved
(from [f7a8e394008f62e8f07874f6c679e10c40e8de57]) Prevent assert_template failures when a render :inline is called before rendering a file-based template [#1383 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
-
Repository November 18th, 2008 @ 04:11 AM
(from [75fb8dfb996f5c5d8b64d10ce7b27eeb681d5316]) Prevent assert_template failures when a render :inline is called before rendering a file-based template [#1383 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
-
Jarl Friis November 1st, 2010 @ 07:37 PM
- Importance changed from to
Watchers of this ticket may be interested in ticket #5891
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 1383 render_to_string :inline before normal render causes assert_template failures (from [f7a8e394008f62e8f07874f6c679e10c40e8de57]) Prevent...
- 1383 render_to_string :inline before normal render causes assert_template failures (from [75fb8dfb996f5c5d8b64d10ce7b27eeb681d5316]) Prevent...
- 5891 render_to_string :template before normal render causes assert_template failures See also ticket #1383 for an earlier similar problem.