This project is archived and is in readonly mode.
content_for not rendering from partials in layout
-
DHH
- State changed from new to invalid
I just tried the same and cannot replicate that in 2.3 RC1. Please reopen if you still see the problem in 2.3. Including a failing test would help too.
-
Greg Hazel
I ran in to what I thought was this issue, but I was using fragment caching. Since the partial was not executed again, the content_for was not called.
content_for could be written differently to handle this.
-
Greg Hazel
Also, this bug makes sense. The "yield :head" is executed before the "render :partial => 'menu'" is run, meaning it does not yet have content for :head.
So, DHH, I don't believe you tried this, but I guess it's not a bug either.
-
Thomas Watson
Hmmm... I get this bug to in Rails 2.3.2.
Ryan Bates did a RailsCast on this back in 2007. But now, suddenly a lot of comments are appearing on the episode page, discussing Rails 2.3.2 and that this now doesn't work:
-
maurizio.demagnis (at gmail)
- Tag set to content_for, partials, yield
I'm experiencing the same problem: http://pastie.org/697104
my environment:
$ rails -v ruby -vRails 2.3.4
$ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
$ uname -a Darwin MacBook-di-maurizio-de-magnis.local 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386 i386That's pretty annoying imho :)