I have a custom js file in app/assets/javascripts. This is the js file:
js
app/assets/javascripts
//app/assets/javascripts/contacts.js //$(document).ready(functi
With Turbolinks version 5 (starting from Rails 5) you need to use:
$(document).on("turbolinks:load", function () { // YOUR CODE });