I'm working with Rails 4
and would like to use the built in Turbolink
gem. I'm happy with all it does except I'd like it to reload one of the js files upon every page request.
In other words I'd like a specific js file to ignore turbolinks, how can I do this?
You can use 'page:load' event from turbolinks to connect an initialize function to it. It will be called always when turbolinks fully reaload your new page.
If you use jQuery a lot, it is useful to install in your Gemfile
and your application.js
Turbolinks has two other useful events: