Trouble With Rails 4 - Turbolinks
I ran into a problem with my Rails 4 server. My
$(document).ready() was not
being called. After digging around a bit I found it was because of turbolinks.
Turbolinks makes your webpage load faster because it updates the head and
The problem is that the
onload for the document is not triggered, which means
that this breaks jQuery’s
The easiest solution is to use jquery.turbolinks
This update the jQuery so that
$(document).ready() will also register to
page:load event. Now everything should be working normally.