Skip to content

Commit

Permalink
Config: suppress secret key warning
Browse files Browse the repository at this point in the history
Rails is producing a deprecation warning when running tests because Devise
is reaching for secrets instead of credentials.

Explicitly set the devise secret key to prevent it from searching in
Rails.application.secrets.

See heartcombo/devise#5644

References #294
  • Loading branch information
ybakos committed Mar 25, 2024
1 parent e4acb32 commit 489b4a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# confirmation, reset password and unlock tokens in the database.
# 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 = '62b657e02c9c9a86c20eb14737432ed43d90389ec25d11a84ad4df40634dd1b3efcf3b1559e585c09aa7b2a744f16af3127256c33d0a0de4ccb30d278b6fe832'
config.secret_key = Rails.application.secret_key_base

# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
Expand Down

0 comments on commit 489b4a3

Please sign in to comment.