Javascript with Turbolinks in Rails 4

If some of your scripts don't work with turbolinks, you should do the following:

ready = ->
  #your code here
  
$(document).ready(ready)
$(document).on('page:load', ready)

konjoot Over 10 years ago