aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-10-20 17:00:47 -0600
committerSean Griffin <sean@seantheprogrammer.com>2015-10-20 17:00:47 -0600
commit6ae515d1bf1fe60527b010ffd35314470000e864 (patch)
treef58a11c80099bcb6c5f82caeb08baa58f2c5e008 /railties/lib/rails
parent0ebe8e580520b41a5957099868973bcdec5ab7e5 (diff)
parentfe3a89687f89c2f640f90a59221698c3327cda9b (diff)
downloadrails-6ae515d1bf1fe60527b010ffd35314470000e864.tar.gz
rails-6ae515d1bf1fe60527b010ffd35314470000e864.tar.bz2
rails-6ae515d1bf1fe60527b010ffd35314470000e864.zip
Merge pull request #19898 from prathamesh-sonpatki/common-secrets
Added an example to show how common secrets can be shared across multiple environments in secrets.yml [ci skip]
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/secrets.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/secrets.yml b/railties/lib/rails/generators/rails/app/templates/config/secrets.yml
index b2669a0f79..433133db98 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/secrets.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/secrets.yml
@@ -10,6 +10,22 @@
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
+# You can also share common secrets in multiple environments
+# using YAML anchor/reference syntax.
+
+# common: &common
+# api_key: <%= API_KEY %>
+# api_secret: <%= API_SECRET %>
+
+# development:
+# <<: *common
+#
+# test:
+# <<: *common
+#
+# production:
+# <<: *common
+
development:
secret_key_base: <%= app_secret %>