You can use the "page: load" event from turbolinks to connect the initialization function to it. It will always be called when turbolinks fully loads your new page.
function initialize() {
If you use jQuery a lot, it is useful to install in your Gemfile
gem 'jquery-turbolinks'
and your application.js
//= require jquery //= require jquery.turbolinks
Turbolinks has two other useful events:
page:fetch //when new page begin to download page:change //when the page has changed over
source share