Ruby on Rails: loops and index in object array brackets -


Why is it that my index is not working properly in a loop (in the object array bracket)?

  <. (1..7) .each do | i | & Gt%; & Lt;% = select_tag 'Hour [days] [# {i}]', Selection for option_ (day_hur)% & gt; & Lt;% end% & gt;   

should not be # {i} 1, 2, 3, .... 7 in this loop?

  & lt;% = select_tag 'hour [day] [1]', options_for_select (days_hours)%> & Lt;% = select_tag 'Hour [days] [2]', options_for_select (days_hours)%> & Lt;% = select_tag 'Hour [days] [3]', options_for_select (days_hours)%> ... & lt;% = select_tag 'hour [day] [7]', for option__description (day_hor)%>   

When I check my HTML, it only remains # ii . Try using " (double quote) instead of

  & lt;% (1..7). Ic | I | & gt; & lt;% = select_tag "hours [days] [# {i}]", for option__description (Day_Hor)%>     

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -