Not sure if any of you came across this issue yet, but when you are using <a href=> links to navigate with Turbo, it keeps on adding FORM elements at the bottom of the page.
Digging a little deeper I found out that maybe it’s Rails UJS that’s messing with links that have a data-method attribute, as seen here: https://github.com/rails/rails/blob/main/actionview/app/assets/javascripts/rails-ujs/features/method.coffee. The handleMethod function creates the form element that is later appended to the HTML body (which is what you see each time you click the link), then it calls preventDefault and stopPropagation (source code here), which is what may prevent Turbo Drive from working properly.
I have to add data-method=true because I want to trigger my new.turbo_stream.erb file. Without it, i get the text/html variant template not found error.
Using button_to doesn’t work either. I keep getting the same error.
There is general confusion surrounding data-turbo=true, data-local=true/false, how turbo_stream variant templates can be called, why links don’t work as most assume they should.
So the end result is these hacks to make things work.