I am working on "The Turbo Rails Tutorial".
Problem
In Chapter 7, I can't disable Turbo on the whole application only by writing the below. For example, when I push the submit button it won't return to the homepage.
// app/javascript/application.js
import { Turbo } from "@hotwired/turbo-rails"
Turbo.session.drive = false
Solution
The rule would be changed a bit from Turbo 7.2.x. We can add data-turbo="false"
to the tag and disable Turbo.
// app/views/layouts/application.html.erb
<body data-turbo="false">
Top comments (0)