From 2e507d476bae2411d07c1f33023ee6766239908a Mon Sep 17 00:00:00 2001 From: Stanley Date: Tue, 17 Sep 2024 12:57:48 +0800 Subject: [PATCH] Fix Rails.application.secrets deprecation warning in Devise config DEPRECATION WARNING: `Rails.application.secrets` is deprecated in favor of `Rails.application.credentials` and will be removed in Rails 7.2. (called from at /home/slau/fat_free_crm/config/environment.rb:5) https://github.com/heartcombo/devise/issues/5644 --- config/initializers/devise.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 6ce314982b..fe3ab2cf65 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -16,6 +16,7 @@ # Devise will use the `secret_key_base` as its `secret_key` # by default. You can change it below and use your own secret key. # config.secret_key = SecureRandom.hex(64) + config.secret_key = Rails.application.secret_key_base # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer,