Skip to content

Commit 06e7187

Browse files
authored
Merge pull request #1112 from pod4lib/1107-devise-config
Configure devise for hotwire + turbo
2 parents f94ffc7 + b7b50a5 commit 06e7187

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

config/initializers/devise.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,4 +361,10 @@
361361
# When set to false, does not sign a user in automatically after their password is
362362
# changed. Defaults to true, so a user is signed in automatically after changing a password.
363363
# config.sign_in_after_change_password = true
364+
365+
# Configurations to support for Hotwire + Turbo, default in Rails 7+
366+
# So that login errors notifications will be displayed
367+
# See: https://github.com/heartcombo/devise/blob/v4.9.0/CHANGELOG.md
368+
config.responder.error_status = :unprocessable_entity
369+
config.responder.redirect_status = :see_other
364370
end

0 commit comments

Comments
 (0)