On Dec 4, 11:57 pm, Nathan Weizenbaum <
nex...@gmail.com> wrote:
> The Haml 2.0.5 tests do test content_for / yield, and the tests pass.
> Can you provide an example of how it doesn't work?
I've just encountered the same problem (Rails 2.2.2, Haml 2.0.5). Here
is some code:
[app/views/frontpage/tv.html/haml]
- content_for(:sidebar) { render(:partial => "sidebar") }
[app/views/frontpage/_sidebar.html.haml]
- cache("ads") do
- for ad in Ad.current
ad
.
section.ad
= link_to(image_tag(ad.image.url), ad.url)
%br
= link_to(ad.title, ad.url)
[app/views/layouts/application.html.haml]
= yield :sidebar
Nothing shows up... but this works:
[app/views/frontpage/tv.html]
- content_for :sidebar, render(:partial => "sidebar")
So it looks like it's just the block version of content_for that's
broken.
S.