

Don't attach UJS form submission handlers to Turbo forms by dhh · Pull Request #...
source link: https://github.com/rails/rails/pull/42476
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

If you're migrating an application written for Rails UJS to the new Turbo framework in Hotwire, you might well want to have Turbo and UJS coexisting during the migration (or forever!). To do this, you need a way to distinguish how handles form submissions. With these updated selectors, Rails UJS will leave forms marked with data-turbo=true
alone, leaving them to be processed by Turbo.
(Mirror PR of rails/jquery-ujs#521).
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK