The simplest solution:
Paste the gemfile into this:
gem 'jquery-turbolinks', '~> 1.0.0'
Insert your application application.js:
//= require jquery.turbolinks
(Don't forget a bundle update )
If you have coffescript code, it will be launched to completely reload the page or to open the page using the link when turbolinks is turned on:
$ -> alert 'Hello World'
( $ -> means document.ready )
source share