diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-16 16:11:32 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-16 16:11:32 +0900 |
commit | 34956f7422798f27f8926544d58771042f6f1c3a (patch) | |
tree | 3ae6729f4b4309d8161f0abe5af7e40b49a1994d | |
parent | 81a2e1cb278bccdf75591e454dfbbe476989f059 (diff) | |
parent | 8a3cf5340c56b4cd94088b8bc06b89ac22321020 (diff) | |
download | rails-34956f7422798f27f8926544d58771042f6f1c3a.tar.gz rails-34956f7422798f27f8926544d58771042f6f1c3a.tar.bz2 rails-34956f7422798f27f8926544d58771042f6f1c3a.zip |
Merge pull request #30618 from y-yagi/fix_credentails
Fix typo: `credentails` -> `credentials` [ci skip]
-rw-r--r-- | guides/source/security.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/security.md b/guides/source/security.md index a74de22ac0..2ac52155f8 100644 --- a/guides/source/security.md +++ b/guides/source/security.md @@ -1038,18 +1038,18 @@ By default, this file contains the application's access keys for external APIs. The credentials added to this file are accessible via `Rails.application.credentials`. -For example, with the following decrypted `config/credentails.yml.enc`: +For example, with the following decrypted `config/credentials.yml.enc`: secret_key_base: 3b7cd727ee24e8444053437c36cc66c3 some_api_key: SOMEKEY -`Rails.application.credentails.some_api_key` returns `SOMEKEY` in any environment. +`Rails.application.credentials.some_api_key` returns `SOMEKEY` in any environment. If you want an exception to be raised when some key is blank, use the bang version: ```ruby -Rails.application.credentails.some_api_key! # => raises KeyError: key not found: :some_api_key +Rails.application.credentials.some_api_key! # => raises KeyError: key not found: :some_api_key ``` Additional Resources |