This is probably very easy, but I'm having a hard time figuring it out.
I have a partial:
<% for room in @scrape %>
<tr id="page_<%= room.id %>">
<th scope="row" class="<%= cycle("spec", "specalt") -%>"><%=h room.name %></td>
<td class="<%=current_cycle%>"><%=h room.day1 %></td>
<td class="<%=current_cycle%>"><%=h room.day2 %></td>
<td class="<%=current_cycle%>"><%=h room.day3 %></td>
<td class="<%=current_cycle%>"><%=h room.day4 %></td>
<td class="<%=current_cycle%>"><%=h room.day5 %></td>
<td class="<%=current_cycle%>"><%=h room.day6 %></td>
<td class="<%=current_cycle%>"><%=h room.day7 %></td>
<td class="<%=current_cycle%>"><%= select_tag("room[#{room.id}]", options_for_select(0..room.spots,0)) %></td>
</tr>
<% end %>
From a find_by_sql result like so:
ID Room Day1 Day2 Day3 Day4 Day5 Day6 Day7
18298 Blue Room 13.23 13.23 13.23 13.23 13.23 13.23 13.23
But I don't know how many days there will be, how can I loop thru the column results for the different Days?