2
繭を使用して入れ子になった属性を追加しています。私は、私の見解でコードを次ていますテーブルに繭を使用してフィールドを追加できません
<table>
<thead>
<tr>
<th>Title</th>
<th>Action</th>
</tr>
</thead>
<tbody id="emergency_personnels">
<%= f.fields_for :emergency_personnels do |emergency_personnel| %>
<%= render 'emergency_personnel_fields', f: emergency_personnel %>
<% end %>
</tbody>
</table>
<%= link_to_add_association 'Add emergency personnel', f, :emergency_personnels, data: {"association-insertion-node" => "tbody#emergency_personnels", "association-insertion-method" => "append"} %>
それが正常に動作する必要がありますが、新しいフィールドは、テーブルのtbodyの下に追加されていない代わりに、それは表の外に表示されます。
誰でも解決策を提案できますか?おかげで繭のドキュメントを1として
いくつかの調整がありました。ありがとう –
私は答えを更新するつもりを共有してください.... –