Okay,
I know there are multiple questions related to this, but none of them seem to help me get any further. Basically my delete links are no longer working, and I'm aware that this is because of the removal of rails-ujs in Rails 7, but I simply cannot get them to work.
The application comes from a Rails 6 version, and now runs Rails 7. The following things have been added:
hotwire-railsjsbundling-railscssbundling-railsturbolinkssprockets-rails
I've followed all the instructions of the gems by setting up the required steps in my package.json so that everything compiles properly when running assets:precompile etc. And the application works properly, TailwindCSS and everything gets loaded except I cannot get the delete links to work whatsoever.
I tried the following approaches:
.flex.flex.row.pt-5.justify-center
= form.submit class: "btn-submit"
- if application.persisted?
button.btn.btn-red.inline-block
= button_to 'Destroy', application_path(application), method: :delete
.flex.flex.row.pt-5.justify-center
= form.submit class: "btn-submit"
- if application.persisted?
button.btn.btn-red.inline-block
= link_to 'Destroy', application_path(application), data: { turbo_method: :delete }
I've tried adding @rails-ujs back to the package file, nothing seems to work.
It keeps just doing a GET on the object URL.
How do I get this mess untangled and make delete links again?