Skip to content

Commit

Permalink
Use the new method for getting secret_key_base
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jan 18, 2024
1 parent a36d8fb commit 91dd0b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/concerns/blacklight/token_based_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def secret_key_generator
@secret_key_generator ||= begin
app = Rails.application

secret_key_base = if app.respond_to?(:credentials)
secret_key_base = if app.respond_to?(:secret_key_base)
# Rails 7
app.secret_key_base
elsif app.respond_to?(:credentials)
# Rails 5.2+
app.credentials.secret_key_base
else
Expand Down

0 comments on commit 91dd0b9

Please sign in to comment.