问题
I have a Javascript, which should work on $(document).ready
but it won't, because I also have to use turbolinks.
Is there a way to disable it for this script?
Or at least, is there a way to disable it for the view, I want my script to work on?

Sadly, my Site has to have allways the same layout file, as it is important for the corporate-style.
Ok, I found a way, how it should be done, but i don't know how to do it. In my application.html.erb, I have tp add
<body <% if(######) %> data-no-turbolinks <% end %> >
The Problem is, I don't know, how to check, if I'm on the Page. Can anyone give me a hint?
回答1:
current_page?(view_path) will check your if statement(not enought rep for comment this)
回答2:
1) turn off turbolinks - see http://blog.steveklabnik.com/posts/2013-06-25-removing-turbolinks-from-rails-4
2) use new page:load event that turbolinks fires - $(document).on('page:load', your_start_function);, see Rails Jquery doesn't work on other pages - guessing in your case it would be something like
来源:https://stackoverflow.com/questions/23126848/how-to-disable-turbolinks-for-single-page-in-a-shared-view