diff options
author | David Gay <david@davidgay.org> | 2021-05-31 17:02:34 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-31 17:02:34 -0400 |
commit | 7113d69455d9600baa6d26796fb5b0d0ced1c939 (patch) | |
tree | 522665fbfcf800e0803e88c82e73a38bbd662388 /config | |
parent | 9e01676407d761a31b530bc63c82548871827089 (diff) |
Automatically start resting on logout
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/devise.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 2bf00cf..16a3ecc 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -126,7 +126,7 @@ Devise.setup do |config| config.stretches = Rails.env.test? ? 1 : 12 # Set up a pepper to generate the hashed password. - config.pepper = '3e1720e4cab9aff2366b15db51f2d059aa8ba78ae2506f6a0f22da73969e252b766f8903f18a100f1960c1e43f28d03860d02135b52baf812117981f48a951f6' + config.pepper = "3e1720e4cab9aff2366b15db51f2d059aa8ba78ae2506f6a0f22da73969e252b766f8903f18a100f1960c1e43f28d03860d02135b52baf812117981f48a951f6" # Send a notification to the original email when the user's email is changed. # config.send_email_changed_notification = false @@ -308,4 +308,9 @@ Devise.setup do |config| # When set to false, does not sign a user in automatically after their password is # changed. Defaults to true, so a user is signed in automatically after changing a password. # config.sign_in_after_change_password = true + + # ==> Before logout configuration + Warden::Manager.before_logout do |user, _, _| + user.active_character&.start_resting + end end |