I was able to get this working!
Somewhere along the way of me trying things, I stumbled upon mention of the turbo-rails
gem. I found a working solution with these pieces:
- Add this in the
application.html.erb
file:<%= javascript_include_tag "turbo", type: "module" %>
- Add
gem "turbo-rails", "~> 1.0"
to your Gemfile - Run
bundle install
- Run
bin/rails turbo:install
Note: not sure if this last step is necessary, but I was following instructions from here
Using these steps, the code from the rails guide works, along with the confirmation dialog.