class ApplicationController < ActionController::Base
before_action :authenticate_user!
rescue_from ActionController::InvalidAuthenticityToken do
handle_unauthenticated(reason: :csrf)
end
import { Turbo } from "@hotwired/turbo-rails"
Turbo.StreamActions.redirect = function () {
const url = this.getAttribute("url")
if (!url) return