Haml 2.0.5 Released

0 views
Skip to first unread message

Nathan Weizenbaum

unread,
Nov 29, 2008, 3:00:59 AM11/29/08
to ha...@googlegroups.com
Hi folks,

I just released Haml 2.0.5. It should hit the mirrors pretty soon. It's
largely minor bug fixes, but it also brings Rails 2.2 compatibility, so
I urge everyone to upgrade.

- Nathan

ashchan

unread,
Nov 29, 2008, 4:18:44 AM11/29/08
to Haml
Cool! The content_tag and div_for issue has been fixed now. Thanks!

tmorgan99

unread,
Dec 4, 2008, 5:18:50 PM12/4/08
to Haml
Hello:
I am reporting an upgrade issue in Rails 2.2.

It seems that content_for / yield no longer works for me.

If I reset Rails to 2.1, it works as expected, but in 2.2, the
captured content seems to get lost somewhere.

Not really sure where.
Thanks




Nathan Weizenbaum

unread,
Dec 4, 2008, 5:57:38 PM12/4/08
to ha...@googlegroups.com
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?

Mislav Marohnić

unread,
Dec 4, 2008, 7:01:03 PM12/4/08
to ha...@googlegroups.com
We're using content_for with Rails 2.2 and I don't remember it being broken even in the previous version of Haml. It certainly isn't broken now.

Evgeny

unread,
Dec 12, 2008, 4:28:10 PM12/12/08
to ha...@googlegroups.com
Nathan, please push the tag for 2.0.5 to github.
Thanks.

Nathan Weizenbaum

unread,
Dec 13, 2008, 6:36:55 PM12/13/08
to ha...@googlegroups.com
Pushed, sorry about that.

Stefano Cobianchi

unread,
Dec 16, 2008, 3:33:30 PM12/16/08
to Haml
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.

Stefano Cobianchi

unread,
Dec 16, 2008, 4:07:52 PM12/16/08
to Haml
On Dec 16, 9:33 pm, Stefano Cobianchi <stefano.cobian...@gmail.com>
wrote:

> So it looks like it's just the block version of content_for that's
> broken.

Or maybe not... this works:

- content_for(:sidebar) do
= render(:partial => "sidebar")

but not this:

[application_helper.rb]
def sidebar
content_for(:sidebar) { render :partial => "sidebar" }
end

[app/views/frontpage/tv.html.haml]
- sidebar

S.

Nathan Weizenbaum

unread,
Dec 17, 2008, 1:33:26 AM12/17/08
to ha...@googlegroups.com
This is fixed in stable, and will be released as 2.0.6 very soon.
Reply all
Reply to author
Forward
0 new messages