Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Bug in #cycle
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
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:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jesse  
View profile  
 More options Oct 28, 2:03 pm
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

=+
+=
=+


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric Wollesen  
View profile  
 More options Oct 28, 3:52 pm
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.

--
Eric Wollesen
ewolle...@gmail.com

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Weizenbaum  
View profile  
 More options Oct 28, 3:52 pm
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.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Katherine Giron Pe  
View profile  
 More options Oct 28, 5:07 pm
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.

--
-----
BridgeUtopia Web
http://blog.bridgeutopiaweb.com

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jesse  
View profile  
 More options Nov 18, 4:58 am
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:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google