I use this code to generate the td tag format:
<%= render(:partial => "cart_item", :collection => @cart.items) %>
And this is the _cart_item.html.erb:
<tr>
<td class="column-left"><%=h cart_item.title %></td>
<td> x <%= cart_item.quantity %></td>
<td class="column-right">$ <%= cart_item.price %></td>
</tr>
But I want to know the row number as well. How can I do?