Skip to content

Commit

Permalink
Turning Turbo drive on/off
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefranken committed Mar 4, 2025
1 parent e7d7056 commit da5cc8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Entry point for the build script in your package.json
import "@hotwired/turbo-rails"
import "./controllers"

import { Turbo } from "@hotwired/turbo-rails"
Turbo.session.drive = true
3 changes: 2 additions & 1 deletion app/views/quotes/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<h1>Quotes</h1>
<%= link_to "New quote",
new_quote_path,
class: "btn btn--primary" %>
class: "btn btn--primary",
data: { turbo: true } %>
</div>

<%= render @quotes %>
Expand Down

0 comments on commit da5cc8f

Please sign in to comment.