Use Turbo.fetch to prevent page refreshes bounces#23
Conversation
|
Merged @jorgemanrubia! |
|
We will have to fix this in https://github.com/rails/request.js, though |
|
@jorgemanrubia just so I fully understand this, essentially, it would be ideal for request.js to always use Turbo's fetch when available, not just for a specific response kind? |
|
Ok, changing it on the request.js repo, here is the PR rails/request.js#90 |
|
Ok, released v13 of the js package https://github.com/rails/request.js/releases/tag/v0.0.13, and v14 of the gem https://github.com/rails/requestjs-rails/releases/tag/v0.0.14 |
|
Will send the follow-up PR to Fizzy, thanks guys! |
Yes, exactly. The response kind filter didn't really make sense here: we want that whenever you use this library to make fetch requests, it triggers the Turbo mechanism to prevent self-triggered page refreshes, regardless the response kind (which can't be really anticipated). Thanks for merging it 🙏 |
Extracted from fizzy as requested by @jorgemanrubia at basecamp/fizzy@ebf8490