Ruby on Rails 4 javascript not executed
$(document).ready(function() { } # Not working with turbo-links
From
Turbolinks overrides the normal page loading process, the event that this relies on will not be fired. If you have code that looks like this, you must change your code to do this instead:
$(document).on('ready page:load', function () {
// you code here
});
Another question