Ticket #22 (closed defect: worksforme)

Opened 2 years ago

Last modified 2 years ago

cycle doesn't work

Reported by: joeruby Owned by: why
Priority: minor Milestone:
Component: gem Version: 0.5
Keywords: cycle Cc:

Description

cycle doesn't seem to work:

tr :class=>@helpers.cycle('odd', 'even') do tr :class=>@helpers.cycle('odd', 'even', :name=>'rows') do

Either of which results in only one 'class="odd"' getting output.

tr.@…e('odd', 'even') do

causes an error.

Change History

Changed 2 years ago by why

  • status changed from new to closed
  • resolution set to worksforme

You should be able to just use cycle directly:

 ul do
   10.times do |i|
     li i, :class => cycle('odd', 'even')
   end
 end

Or, this works as well:

 ul do
   10.times do |i|
     li cycle('odd', 'even')
   end
 end
Note: See TracTickets for help on using tickets.