Questions tagged [turbolinks]

Turbolinks makes following links in your web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces only the body and the title in the head.

Turbolinks makes following links in your web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces only the body and the title in the head. Think CGI vs persistent process.

Documentation and download

954 questions
430
votes
20 answers

Rails 4: how to use $(document).ready() with turbo-links

I ran into an issue in my Rails 4 app while trying to organize JS files "the rails way". They were previously scattered across different views. I organized them into separate files and compile them with the assets pipeline. However, I just learned…
emersonthis
  • 32,822
  • 59
  • 210
  • 375
94
votes
9 answers

Rails 5: how to use $(document).ready() with turbo-links

Turbolinks prevents normal $(document).ready() events from firing on all page visits besides the initial load, as discussed here and here. None of the solutions in the linked answers work with Rails 5, though. How can I run code on each page visit…
AndrewH
  • 3,418
  • 2
  • 15
  • 27
68
votes
18 answers

Rails ExecJS::ProgramError in Pages#home?

Starting a new app, when I create a controller page home and try to go to local host:3000/pages/home, I get the following error: Showing c:/Users/Doesha/desktop/pinplug/app/views/layouts/application.html.erb where line #6 raised: TypeError: Object…
AB10
  • 1,003
  • 2
  • 14
  • 19
60
votes
9 answers

Using angularjs with turbolinks

I am trying to use Angularjs framework in my app with turbolinks. After page change it do not initialize new eventlisteners. Is it any way to make it work? Thanks in advance!
Pavel
  • 3,900
  • 6
  • 32
  • 41
50
votes
10 answers

Rails 4: disable Turbolinks in a specific page

I'm trying to make a JS snippet work in a concrete page with Rails 4 and Turbolinks. I've tried with the standard solution: