I have nested grids in my views and would like to use same CSS classes for each grid. When I use two nested cycle( "odd", "even" ) helpers I get messed CSS like three rows with odd class
Sample grid
<% first_collection.each do |entry| %>
<tr class="<%= cycle( "odd", "even" ) %>">
# some info here
<% entry.records.each do |record| %>
<div class="<%= cycle( "odd", "even" ) %>">
<%= record.value %>
</div>
<% end %>
</tr>
<% end %>
so the question – is it possible to have two same nested cycles which don’t mess with each other ?
You can apply a name to each cycle call to keep them separate.