提交 8a3cf534 编写于 作者: Y yuuji.yaginuma

Fix typo: `credentails` -> `credentials` [ci skip]

Follow up of ca18922a
上级 536d3068
...@@ -1038,18 +1038,18 @@ By default, this file contains the application's ...@@ -1038,18 +1038,18 @@ By default, this file contains the application's
access keys for external APIs. access keys for external APIs.
The credentials added to this file are accessible via `Rails.application.credentials`. 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 secret_key_base: 3b7cd727ee24e8444053437c36cc66c3
some_api_key: SOMEKEY 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 If you want an exception to be raised when some key is blank, use the bang
version: version:
```ruby ```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 Additional Resources
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册