datatable turbolinks bug code example
Example: double datatable turbolinks issue
var dataTable = $('.data-table').DataTable();
document.addEventListener("turbolinks:before-cache", function() {
if (dataTable !== null) {
dataTable.destroy();
dataTable = null;
}
});