$(function(){
  $(".tablesorter").tablesorter();
  $("tr[data-link]").click(function() {
    window.location = $(this).data("link")
  });
  console.log('Scripts loaded.');
});

var tablesort = function() {
  $(".tablesorter").tablesorter();
  console.log('Tablesorter loaded.');
};

$(document).on('turbolinks:load', tablesort);

Load js on turbolink refresh
Load js on turbolink refresh
