aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2013-12-17 12:40:13 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2013-12-17 12:40:13 -0500
commit83e4dde41a09bf501c41386f874a83b2f50af5f3 (patch)
treeb86aa298a44637a4195b9574f3303b5ed538f01b
parentbb0bc7a26f63250df00016024650caa669fc4df0 (diff)
downloadrails-83e4dde41a09bf501c41386f874a83b2f50af5f3.tar.gz
rails-83e4dde41a09bf501c41386f874a83b2f50af5f3.tar.bz2
rails-83e4dde41a09bf501c41386f874a83b2f50af5f3.zip
Add changelog entries about secrets.yml and secrets.secret_key_base
-rw-r--r--railties/CHANGELOG.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index cf8d2c2c88..8fbac31c0a 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,32 @@
+* Move `secret_key_base` from `config/initializers/secret_token.rb`
+ to `config/secrets.yml`.
+
+ `secret_key_base` is now saved in `Rails.application.secrets.secret_key_base`
+ and it fallbacks to the value of `config.secret_key_base` when it is not
+ present in `config/secrets.yml`.
+
+ `config/initializers/secret_token.rb` is not generated by default
+ in new applications.
+
+ *Guillermo Iguaran*
+
+* Generate a new `secrets.yml` file in the `config` folder for new
+ applications. By default, this file contains the application's `secret_key_base`,
+ but it could also be used to store other secrets such as access keys for external
+ APIs.
+
+ The secrets added to this file will be accessible via `Rails.application.secrets`.
+ For example, with the following `secrets.yml`:
+
+ development:
+ secret_key_base: 3b7cd727ee24e8444053437c36cc66c3
+ some_api_key: SOMEKEY
+
+ `Rails.application.secrets.some_api_key` will return `SOMEKEY` in the development
+ environment.
+
+ *Guillermo Iguaran*
+
* Add `ENV['DATABASE_URL']` support in `rails dbconsole`. Fixes #13320.
*Huiming Teo*