In my view file I type the following:
<table>
<tr>
<td><%= link_to(tag(:div, {:class => "my_class"}), "my_address") %></td>
</tr>
</table>
The result is: (observed in Firebug)
<table>
<tbody>
<tr>
<td>
<a href="my_address"></a>
<div class="my_class"></div>
</td>
</tr>
</tbody>
</table>
Why the div
is not inside a
?
` is a block level element as well, which won't work for the same reasons `