With partial in a block is there any way to face "cycle" to restart?

Im trying to display lists of products on a page which is split up
into categories which is fine but, the way they are displayed is in a
3xwhatever grid so i was using cycle in my partial to set css styles
for the spacing.

<div class="banner <%= cycle :left, :center, :right %>">

But then i split it up to also display the category name like so.

<% @categories.each do |category| %>
  <div class="category">
    <h3><%= category.name %></h3>
    <%= render :partial => "/shared/banner", :collection =>
category.products %>
  </div>
<% end %>

Problem is. the cycle does not “restart” after each loop of the block
so they get out of order if a preceding category has an even number of
products. is there any way to force the cycle back to “left” after
each pass?

Thanks. mike

On Sep 26, 3:36 pm, “[email protected][email protected] wrote:

Problem is. the cycle does not “restart” after each loop of the block
so they get out of order if a preceding category has an even number of
products. is there any way to force the cycle back to “left” after
each pass?

reset_cycle

Fred