devise icon indicating copy to clipboard operation
devise copied to clipboard

Replace [data-turbo-cache=false] with [data-turbo-temporary]

Open eduardoyutaka opened this issue 2 years ago • 2 comments

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

eduardoyutaka avatar Dec 18 '23 16:12 eduardoyutaka

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?

timdiggins avatar Dec 19 '24 16:12 timdiggins

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.

carlosantoniodasilva avatar Oct 31 '25 17:10 carlosantoniodasilva