I have view files like these:
<tr>
<td><%= comment.author %></td>
<td><%= comment.text %></td>
</tr>
<table>
<thead>
<tr>
<td>Author</td>
<td>Text</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
Then I got warning "element table is not close" by RubyMine.
Is there a better way to write table this?
If there is not, is there a way to suppress the warning only when the file name includes _header
or _footer
?
I want keep active this warning itself for other files.
Use a _table.html.erb
partial and don't split it up into header and footer.
comments/_table.html.erb
<table>
<thead>
<tr>
<td>Author</td>
<td>Text</td>
</tr>
</thead>
<tbody>
<%= render @comments %> <!-- Rails magic here! -->
</tbody>
</table>
comments/_comment.html.erb
<tr>
<td><%= comment.author %></td>
<td><%= comment.text %></td>
</tr>