-
Notifications
You must be signed in to change notification settings - Fork 21.9k
Closed
Description
Steps to reproduce
Run Rails.application.credentials
from the console from any environment.
Expected behavior
Rails.application.secrets
will return environment specific secrets from secrets.yml
if they are name spaced by environment.
I would expect Rails.application.credentials
to do the same. There are instances where data like third-party API keys are still unique to the loaded environment. It would be nice to be able to store these in the encrypted credentials as well.
Instead of having to do this:
Rails.application.credentials[Rails.env].my_credential
This is preferred:
Rails.application.credentials.my_credential
With a credentials file structured like this:
development:
my_credential: token
test:
my_credential: token
production:
my_credential: token
Actual behavior
Rails.application.credentials
returns all credentials at root level.
System configuration
Rails version: 5.2.0.beta2
Ruby version: 2.4.2
Subtletree, cseelus, simonlehmann, KiranPanesar, lukad and 17 more
Metadata
Metadata
Assignees
Labels
No labels