Order have has_many association with item while item have also has_many association with records
I use gem nested_form to add records. I use datatable form for records.
<table cellspacing="0px" cellpadding="0px" border="0" class="table-inn table-striped myTable">
<%= item.fields_for :records do |record| %>
<thead class="panel-heading">
//
</thead>
<tbody>
<tr>
//
</th>
</tbody>
<% end %>
</table>
For first item datatable works. but when I click on <%= f.link_to_add "Add More Item", :items %> It not load datatable
$('.myTable').dataTable();
What I do that datable load dyanamically?