As Robin said, that's invalid HTML. You probably shouldn't do that.
I personally would put an onclick
event on the tr
using jQuery. The tr
element would look like this:
<tr data-link="<%= edit_scout_path(scout) %>">
...
</tr>
And then the associated JavaScript (placed in a file such as app/assets/javascripts/scouts.js
) would be something like this:
$("tr[data-link]").click(function() {
window.location = $(this).data("link")
})
This would make all tr
elements that have a data-link
attribute act as if they were URLs in the most unobtrusive way I can think possible.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…