To get what you want, you probably need to use named cycles. See the
rails doc for cycle.
I suspect this problem has nothing to do with haml.
e.
Jesse wrote:
> Failing example (matching first arguments in #cycle) ---
>
> %tbody
> %tr
> %td
> - 1.upto(3) do |i|
> %div(style="background-color: #{cycle '#abC', '#fff'};"
> class="td")= i
>
> %td
> - 1.upto(3).each do |i|
> %div(style="background-color: #{cycle '#abC', '#fff'};"
> class="td")= i
>
> Working example (differing first arguments in #cycle) ---
>
> %tbody
> %tr
> %td
> - 1.upto(3) do |i|
> %div(style="background-color: #{cycle '#abC', '#fff'};"
> class="td")= i
>
> %td
> - 1.upto(3).each do |i|
> %div(style="background-color: #{cycle '#abc', '#fff'};"
> class="td")= i
>
> It also fails using css classes .odd & .even for the rows, and with
> local string variables odd & even
>
> (I realize that this may not be a haml bug, but I've gotten this far.)
>
> Expected result
>
> ==
> ++
> ==
>
> Actual result
>
> =+
> +=
> =+
> >
--
Eric Wollesen
[email protected]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---