diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-09-13 21:26:45 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2017-09-13 21:28:11 +0200 |
commit | ca18922ac23be2cde6963fae9b193c9111bec6f8 (patch) | |
tree | 395a1d4bd327a1b9638dc04df67827c8beffb9b8 /railties | |
parent | 9d7d75cab892f66db9a0173b78a9e1b901224066 (diff) | |
download | rails-ca18922ac23be2cde6963fae9b193c9111bec6f8.tar.gz rails-ca18922ac23be2cde6963fae9b193c9111bec6f8.tar.bz2 rails-ca18922ac23be2cde6963fae9b193c9111bec6f8.zip |
[ci skip] Prefer credentials to secrets in docs.
Removes most mentions of secrets.secret_key_base and explains
credentials instead.
Also removes some very stale upgrade notices about Rails 3/4.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/application.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/commands/credentials/USAGE | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 6ce8b0b2d9..abfec90b6d 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -403,12 +403,12 @@ module Rails end # The secret_key_base is used as the input secret to the application's key generator, which in turn - # is used to create all the MessageVerfiers, including the one that signs and encrypts cookies. + # is used to create all MessageVerifiers/MessageEncryptors, including the ones that sign and encrypt cookies. # # In test and development, this is simply derived as a MD5 hash of the application's name. # # In all other environments, we look for it first in ENV["SECRET_KEY_BASE"], - # then credentials[:secret_key_base], and finally secrets.secret_key_base. For most applications, + # then credentials.secret_key_base, and finally secrets.secret_key_base. For most applications, # the correct place to store it is in the encrypted credentials file. def secret_key_base if Rails.env.test? || Rails.env.development? diff --git a/railties/lib/rails/commands/credentials/USAGE b/railties/lib/rails/commands/credentials/USAGE index 5bd9f940fd..85877c71b7 100644 --- a/railties/lib/rails/commands/credentials/USAGE +++ b/railties/lib/rails/commands/credentials/USAGE @@ -10,7 +10,7 @@ to get everything working as the keys are shipped with the code. === Setup Applications after Rails 5.2 automatically have a basic credentials file generated -that just contains the secret_key_base used by the MessageVerifiers, like the one +that just contains the secret_key_base used by MessageVerifiers/MessageEncryptors, like the ones signing and encrypting cookies. For applications created prior to Rails 5.2, we'll automatically generate a new |