I have a view with a div that is looped many times. Each of the created divs need to have a unique ID so I can access them specifically (at the moment, all my divs have the same ID specified in html so whenever I try to access a specific div it just finds the first one).
This is the version that I currently have (multiple 'rowBox'es are not discernible).
<% @customers.each do |customer| %>
<div id="customer" class="rowBox">
...
</div>
<% end %>
I would like to be able to do something like:
<% @customers.each do |customer| %>
<div id="box<%=customer.id%>">
...
</div>
<% end %>
This doesn't seem to work. Any ideas on how to accomplish this?