Ruby on Rails - disable turbolinks on specific links in ruby on rails - ruby on rails tutorial - rails guides - rails tutorial - ruby rails
It is very easy to disable turbolinks on specific links.
Turbolinks can be disabled on a per-link basis by annotating a link or any of its ancestors with data-turbolinks="false".
Examples:
// disables turbolinks for this one link
<a href="/" data-turbolinks="false">Disabled</a>
// disables turbolinks for all links nested within the div tag
<div data-turbolinks="false">
<a href="/">I'm disabled</a>
<a href="/">I'm also disabled</a>
</div>
// re-enable specific link when ancestor has disabled turbolinks
<div data-turbolinks="false">
<a href="/">I'm disabled</a>
<a href="/" data-turbolinks="true">I'm re-enabled</a>
</div>