The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 |
From: Jesse <teff...@gmail.com>
Date: Wed, 28 Oct 2009 11:03:17 -0700 (PDT)
Local: Wed, Oct 28 2009 2:03 pm
Subject: Bug in #cycle
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
=+
+=
=+
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Eric Wollesen <ewolle...@gmail.com>
Date: Wed, 28 Oct 2009 13:52:46 -0600
Local: Wed, Oct 28 2009 3:52 pm
Subject: Re: [haml] Bug in #cycle
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
ewolle...@gmail.com
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Nathan Weizenbaum <nex...@gmail.com>
Date: Wed, 28 Oct 2009 12:52:40 -0700
Local: Wed, Oct 28 2009 3:52 pm
Subject: Re: [haml] Bug in #cycle
Haml has nothing to do with the cycle helper; that's entirely Rails.
On Wed, Oct 28, 2009 at 11:03 AM, Jesse <teff ...@gmail.com> 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
> =+
> +=
> =+
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Katherine Giron Pe <bridgeuto...@gmail.com>
Date: Thu, 29 Oct 2009 05:07:46 +0800
Local: Wed, Oct 28 2009 5:07 pm
Subject: Re: [haml] Bug in #cycle
Jesse..
You can just use css/sass.
.abc
:background #abC
.white
:background #fff
- row_class = cycle("abc", "white")
-for article in @articles
%div{:class=>row_class}
Something like that...
But seriously that may not be the cause of the error.
On Thu, Oct 29, 2009 at 2:03 AM, Jesse <teff ...@gmail.com> 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
> =+
> +=
> =+
-- -----
BridgeUtopia Web
http://blog.bridgeutopiaweb.com
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Jesse <teff...@gmail.com>
Date: Wed, 18 Nov 2009 01:58:27 -0800 (PST)
Local: Wed, Nov 18 2009 4:58 am
Subject: Re: Bug in #cycle
Reading the documentation, a call to #reset_cycle is the solution.
Thanks.
On Oct 28, 3:07 pm, Katherine Giron Pe <bridgeuto...@gmail.com> wrote:
> Jesse..
> You can just use css/sass.
> .abc
> :background #abC
> .white
> :background #fff
> - row_class = cycle("abc", "white")
> -for article in @articles
> %div{:class=>row_class}
> Something like that...
> But seriously that may not be the cause of the error.
> On Thu, Oct 29, 2009 at 2:03 AM, Jesse <teff...@gmail.com> 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
> > =+
> > +=
> > =+
> --
> -----
> BridgeUtopia Webhttp://blog.bridgeutopiaweb.com
You must Sign in before you can post messages.
You do not have the permission required to post.
|
|
|