You would think that I will earn it in 10 seconds, but I spent half an hour and did not go anywhere ... Here's what I need:
<table>
<% i=0 %>
<% for name in @names%>
<% i++ %>
<tr>
<td><%= "#{i}" %></td>
<td><%= name.first %>"></td>
</tr>
</table>
Yes, all I want is a numbered list of names, for example:
The error I am getting is:
compile error
/blah/_names.html.erb:13: syntax error, unexpected ';'
; i++ ; @output_buffer.concat "\n\t\t <td>"
source
share