Thanks John and Dino! That fixed both the old and new versions. I've been trying to figure that out for awhile now. Much appreciated!
Chris, thank you so much for this! I was actually going through the old drag and drop tutorial yesterday and today to update it for Rails 6.
I seem to be having an issue both with this tutorial and the other where the Rails.ajax line in both of them is causing the error message:
Uncaught ReferenceError: Rails is not defined
In the old tutorial, I was able to get it to work by changing Rails.ajax to $.ajax but that only works with jQuery and not Stimulus. Do you know what might be causing this?
This is really awesome! Yes, please do more videos on Stimulus Reflex. Would love to see how you do a drag-and-drop on the list and other cool client-side interactive tricks.