This project is archived and is in readonly mode.
Regression in 3.0pre With content_for And Layouts
-
Ken Collins
Here is the patch that includes a passing test before the 9f5cd0 commit. It is still failing the inner template part however. Typically I am in ActiveRecord most of the time and I am not sure what needs to be done bring this to full parity with rails 2.3.4. There seems to much going on and I would appreciate feedback.
-
Michael Koziarski
- Milestone cleared.
-
Jeff Bigler
I've been able to duplicate this bug as well using 3.0beta edge. As a matter of fact, it doesn't even require using the content_for tag to see the error. After running a generator to create a simple Posts sample application, I set up a single line layouts/application.html.erb file:
<%= yield %>I then created a layouts/posts.html.erb file with only the single line:
<% render :file => 'layouts/application' %>and it fails with the LocalJumpError message. The error raised is "no block given". If I delete the layouts/posts.html.erb file everything works fine.
-
Carson Baker
Same problem here. Using render :file and content_for/yield gives "No block given" error.
-
Yehuda Katz (wycats)
@Carson would you mind creating a patch with a failing test against master?
-
Jeff Bigler
This is my first attempt to help out with a patch, so I apologize if there are any problems. I tried creating a test case for ActionPack that demonstrates the failure.
-
Jeff Bigler
This appears to be a duplicate of ticket #3459 "yield" doesn't work with content_for_layout and render :file
The patch provided in that ticket fixed the problem.
-
Santiago Pastorino
- State changed from new to duplicate
