Skip to content

Commit d13ef89

Browse files
Replace [data-turbo-cache=false] with [data-turbo-temporary]
The default `_error_messages.html.erb` partial uses a deprecated Turbo attribute `data-turbo-cache=false`, which was deprecated on Feb 15 2023 in [this pull request](hotwired/turbo#871). Use more up-to-date attribute name called [data-turbo-temporary](hotwired/turbo#871) to avoid deprecation issues and reduce developer confusion as `data-turbo-temporary` is the only attributed mentioned in [Turbo Drive's documentation](https://turbo.hotwired.dev/handbook/building#preparing-the-page-to-be-cached) Closes #5664 Closes #5662 Signed-off-by: Carlos Antonio da Silva <[email protected]>
1 parent 051f94a commit d13ef89

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
[#5645](https://github.com/heartcombo/devise/pull/5645)
2121
* Change password instructions button label on devise view from `Send me reset password instructions` to `Send me password reset instructions` [#5515](https://github.com/heartcombo/devise/pull/5515)
2222
* Change `<br>` tags separating form elements to wrapping them in `<p>` tags [#5494](https://github.com/heartcombo/devise/pull/5494)
23+
* Replace `[data-turbo-cache=false]` with `[data-turbo-temporary]` on `devise/shared/error_messages` partial. This has been [deprecated by Turbo since v7.3.0 (released on Mar 1, 2023)](https://github.com/hotwired/turbo/releases/tag/v7.3.0).
24+
25+
If you are using an older version of Turbo and the default devise template, you'll need to copy it over to your app and change that back to `[data-turbo-cache=false]`.
2326
2427
* enhancements
2528
* Add Rails 8 support.

app/views/devise/shared/_error_messages.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<% if resource.errors.any? %>
2-
<div id="error_explanation" data-turbo-cache="false">
2+
<div id="error_explanation" data-turbo-temporary>
33
<h2>
44
<%= I18n.t("errors.messages.not_saved",
55
count: resource.errors.count,

0 commit comments

Comments
 (0)