Skip to content

Instantly share code, notes, and snippets.

@krishan
Created April 20, 2016 16:27
Show Gist options
  • Save krishan/8afab9d957bc9aa135a2d528e8d34c3a to your computer and use it in GitHub Desktop.
Save krishan/8afab9d957bc9aa135a2d528e8d34c3a to your computer and use it in GitHub Desktop.
Disable Turbolinks while App is running inside Scrivito
<% if scrivito_user %>
<%# opt out of turbolinks when running inside Scrivito %>
<body data-no-turbolink>
<% else %>
<body>
<% end %>
if (window.parent && window.parent.scrivito) {
// remove Turbolinks library if app is running inside Scrivito,
// so the Scrivito UI will not show a warning dialog.
Turbolinks = undefined;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment