当我使用如下构造时:
<table>
<%= f.fields_for :group_locations do |gl| %>
<tr>
<td><%= gl.label :group_id %></td>
<td><%= gl.select :group_id, paths %></td>
</tr>
<% end %>
</table>
对于表中的每一行,我在浏览器 (Safari) 中收到错误 ( <input> is not allowed inside <tbody>. Inserting <input> before the <table> instead.
) 这是由隐藏<input>
的关联 ID 放置在</tr>
. 如何使 id<input>
出现在 TD 元素之一中?