rails8-memoapp/app/javascript/application.js

9 lines
235 B
JavaScript
Raw Normal View History

2025-02-24 22:51:13 +09:00
import "@hotwired/turbo-rails";
import "./controllers";
2025-02-20 22:46:52 +09:00
2025-02-24 22:51:13 +09:00
import { Turbo } from "@hotwired/turbo-rails";
2025-02-20 22:46:52 +09:00
Turbo.StreamActions.redirect = function () {
2025-02-24 22:51:13 +09:00
const url = this.getAttribute("url");
Turbo.visit(url, { action: "replace" });
2025-02-20 22:46:52 +09:00
};