Alternate column (<td>) classes in rails?
===

In rails I know you can do

    <tr class="<%= cycle("even", "odd") %>">

to cycle the class for a given row.

But in cases like this

    <% @products.each do |p| %>
    <tr class="headers">
        <td>p.name</td>
        <td>p.idnum</td>
        ...
    </tr>
    <% end %>

how might I automatically alternate the column class?

Is there some way I could something like this? (inventing some fanciful method names ('.column_names') for sake of illustration)

    <% @products.each do |p| %>
        <tr class="headers">
            <% products.column_names.each do |c| %>
                <td class="<%= cycle("even", "odd") %>"><%= c %></td>
             <% end %>
         </tr>
         <% end %>
                
   