0

There are already answers on how to make the confirm button works with DELETE in Rails 7 as Rails 7 now prefer Hotwired Stimulus than Turbo. They are answered here: How to call confirm prompt using button_to in Rails with Turbo. The accepted answer works as far as Rails 7.0.2.3, whereas the newest Rails 7.0.3.1 also have an answer below (which isn't an accepted answer).

However, even after trying this, it doesn't work in Github Codespaces. What's the issue?

Wabinab
  • 21
  • 2
  • 4

1 Answers1

0

That has to do with Github Codespaces localhost. In fact, sometimes Github Codespaces localhost cannot run hotwire stimulus. You can try with the example here: https://stimulus.hotwired.dev/ on your computer, or rent a VM anywhere (Amazon Cloud9, Azure VM, GCP VM, etc) and check that the program can run; then try to run that "for sure it can run" program that uses stimulus controller on Github codespaces and see if it runs or not.

In my experience, sometimes it runs, other times it doesn't run. So, that has nothing to do with your program but Github Codespaces. Prefer to move to another VM and check that it works fine.

Wabinab
  • 21
  • 2
  • 4