Is there an implicit index in this loop?

Hi,

I have the partial below ...

                <% fields_for "ec_order[ec_line_item_attributes]", ec_line_item do |ec_line_item_form| %> <div class="ec_line_item">      Item #<span class="itemNumber">###</span>     <!-- do other stuff --> </div>                 <% end %>

What I'm wondering is if there's a way I can substitute the "###" with an expression that would list the index of the loop (e.g. "1" would be the result for the first iteration, "2" for the second, and so on).

Sure there's an easy way, just don't know it.

Thanks, - Dave

if you're rendering a partial foo, then in addition to there being a local variable called foo, there's also one called foo_counter

Fred