Replace [data-turbo-cache=false] with [data-turbo-temporary]
Following the suggestion from issue https://github.com/heartcombo/devise/issues/5662
The turbo drive's attribute [data-turbo-cache=false] was deprecated in favor of data-turbo-temporary
This should work with Turbo >= 7.3.0 and won't work with Turbo < 7.3.0
Could just support latest version of turbo? (break in old Turbo)
Or stick with old turbo? (deprecation warnings on new Turbo)
Could have a turbo compatibility layer:
<div id="error_explanation" <%= Devise::TurboCompat.gte_730? && 'data-turbo-temporary' || 'data-turbo-cache="false"' %>>
Given that Turbo is a Js library, it seems tricky to find an automatic way to support different versions of turbo. Would then have to be configured by either an env var or a devise configuration option?
Thanks... I might change this for v5 since we're doing a major anyway, and if people need to support the older version, they can always generate the view and change in their app.