aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2009-12-20 14:33:13 -0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2009-12-20 14:33:13 -0800
commitc06aff0a7e42868e9788d6cefe5ce49e93cbf45b (patch)
tree4bf61487c24bfd3d7ecbf5463ee41502ad882690 /railties/lib/rails
parent2419fae092ec207185f9ed69c2aa1ba1cd53fffe (diff)
downloadrails-c06aff0a7e42868e9788d6cefe5ce49e93cbf45b.tar.gz
rails-c06aff0a7e42868e9788d6cefe5ce49e93cbf45b.tar.bz2
rails-c06aff0a7e42868e9788d6cefe5ce49e93cbf45b.zip
Added cookies.permanent, cookies.signed, and cookies.permanent.signed accessor for common cookie actions [DHH]
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/initializers/cookie_verification_secret.rb.tt7
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/cookie_verification_secret.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/initializers/cookie_verification_secret.rb.tt
new file mode 100644
index 0000000000..9808ea6a2d
--- /dev/null
+++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/cookie_verification_secret.rb.tt
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+ActionController::Base.cookie_verification_secret = '<%= app_secret %>';