This project is archived and is in readonly mode.
Rails 3.0.0, 'yield' won't show block contents in render :layout, if it is placed after render :partial
-
Marjan Krekoten'
- Assigned user set to Santiago Pastorino
- Tag changed from block, layout, partial, render to block, layout, partial, patch, render
Fix attached. Also contains test case from Anton Astashov.
-
David Trasbo
+1
Patch applies cleanly and the included test fails without the fix but passes with it.
-
José Valim
- Milestone set to 3.x
- State changed from new to open
- Assigned user changed from Santiago Pastorino to Yehuda Katz (wycats)
- Importance changed from to Low
Unfortunately this fix hits performance. Do we have other options?
-
Anton Astashov
Maybe we can pass a block right to ActionView::Partials::PartialRenderer#render instead of passing it to initialize/setup methods? Please take a look at the attached path.
-
bfalling
+1
I don't know how others are working around this, but this bug has bitten us in a number of apps.
Thanks!
-
Tyler McGill
This just killed 5 hours of development time for me. I'm glad I found this bug report. I'm using 3.0.3. Any update on status?
-
Santiago Pastorino
- Milestone cleared.
- Assigned user changed from Yehuda Katz (wycats) to Santiago Pastorino
Anton, the patch looks good to me. I'm going to apply it, but doesn't apply cleanly now :'(.
Can you rebase it to master and 3-0-stable?. Thanks. -
Santiago Pastorino
Guys the release is going to happen tomorrow please send a rebased patch :).
-
Anton Astashov
Good news - I've applied tests from the patch to 'master' and '3-0-stable' (only the tests, not the actual code), and they passed, all tests are passed. Also, tried to create demo rails app and check this issue there - it works fine. So, looks like the ticket can be closed - this issue was fixed already. Hooray! :)
-
Santiago Pastorino
Anton cool, so can you provide a patch with only tests so we can be sure to avoid a regression?
-
Anton Astashov
Sure, attached.
-
Anton Astashov
Whoops, sorry, forgot the file. Attached. :)
-
Repository
- State changed from open to resolved
(from [c1c6f29214d3c280f5d1d4abb49d0b90424fcbd7]) Add a test for 'render :layout'
To make sure it will show block contents if it is placed after 'render
:partial'[#5557 Rails 3.0.0, 'yield' won't show block contents in render :layout, if it is pl... state:resolved]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/c1c6f29214d3c280f5d1d4abb49d0... -
Repository
(from [53b0235282ebb4953ef2e0644e64c232ec902ef2]) Add a test for 'render :layout'
To make sure it will show block contents if it is placed after 'render
:partial'[#5557 Rails 3.0.0, 'yield' won't show block contents in render :layout, if it is pl... state:resolved]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/53b0235282ebb4953ef2e0644e64c...
