Skip to content

Commit

Permalink
Load secrets into credentials hash to maintain existing behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
KludgeKML committed Oct 31, 2023
1 parent a064968 commit aab01fa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/initializers/secrets_to_credentials.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Rails 7 has begung to deprecate Rails.application.secrets in favour
# of Rails.application.credentials, but that adds the burden of master key
# adminstration without giving us any benefit (because our production
# secrets are handled as env vars, not committed to our repo. Here we
# loads the config/secrets.YML values into Rails.application.credentials,
# retaining the existing behaviour while dropping deprecated references.

Rails.application.credentials.merge!(Rails.application.config_for(:secrets))

0 comments on commit aab01fa

Please sign in to comment.