I have the following code:
<tbody>
<%= Item.each do |item|=%>
<tr>
<th><%= item.rev =%></th> <=========
<th><%= item.name =%></th>
</tr>
<%= end =%>
</tbody>
However I am getting a syntax error on the inidcated line. There is data in the database(Test case). No idea what I am doing wrong.
The equals to signs you have are wrong. Try as below:
The <%= should only be used for expressions that need to be evaluated.
To help understand embedded ruby see this link
http://www.ruby-doc.org/docs/ProgrammingRuby/html/web.html