A collection of objects are found and are sorted on the basis of a unique value
@sections = Section.where('id IN (?)', @sections_uniq).to_a
This is then meant to be presented in the view as tabs (using foundation), with one tab for each unique value
<% @sections.each do |section, index| %>
<li>
<input type="radio" name="tabs" id='tab<%= index %>' />
the index value is necessary to create on tab per unique value.
No version of <%=or #{...} seems to work.
What is the syntax to generate that index value ( i.e. id='tab0', id='tab1'...) within the quoted value of the HTML tag?
each_with_index, since each doesn't yield the index by itself.Enumerator:0x007ffb2c1d0d60type result