Ask A Question


You’re not receiving notifications from this thread.

Custom Turbo Confirm Modals with Hotwire in Rails Discussion

Thanks for this


Any insider info on when your PR for this is going to be shipped/released?


Ya I'm waiting for turbo to be tagged and released as well, how do we reference a github ref for rails to correctly build the js with a branched lib? I'm still confused about how to get the correct versions of JS libs in my app with npm, yarn, and importmaps all playing some part in managing the libs.


Can anyone provide any tips on how to make it so the rails-turbo gem uses the edge version of the @hotwired/turbo NPM dependency? They haven't released a new version of turbo for about 9 months and along with this update that Chris made, there are numerous other fixes.


I was able to get it work by adding a dependency to the latest turbo build in my package.json using the hotwired/dev-builds branch

I added the following then ran yarn install -f

    "@hotwired/turbo": "hotwired/dev-builds#@hotwired/turbo/latest",

This broke every turbo_stream_from tag I had in the app. As in, the frontend wouldn't be listen to updates over the cable. Have you found a workaround for that?


pls can anyone help me here, I used turbo approach cos I need modal/bootsrap for the project but the FORM hardly show on web page and the item get deleted immediately without confirmation, anybody??


Hello there I've been trying to make custom turbo_confirm modal and i noticed a problem, the modal pops up for a second and thing gets deleted I don't even have time to confirm it or cancel.


I used this snippet to close the dialog when someone clicks the backdrop.

dialog.addEventListener('click', (event) => {
  if ( === 'DIALOG') {

From here:

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 84,111+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.