diff options
author | Trevor Turk <trevorturk@gmail.com> | 2013-02-28 14:16:36 -0600 |
---|---|---|
committer | Trevor Turk <trevorturk@gmail.com> | 2013-02-28 14:16:36 -0600 |
commit | decff78d013db0d07331f2d405d85a3f10185a02 (patch) | |
tree | 5d8c3f59cf4216854c3eb53dc09bdcb4ecaca155 | |
parent | 27a304d8e093062723552df056295e59c9993f4b (diff) | |
download | rails-decff78d013db0d07331f2d405d85a3f10185a02.tar.gz rails-decff78d013db0d07331f2d405d85a3f10185a02.tar.bz2 rails-decff78d013db0d07331f2d405d85a3f10185a02.zip |
Improve docs for UpgradeSignatureToEncryptionCookieStore
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 47b246fe76..8e9d9de446 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -66,7 +66,16 @@ Rails 4.0 extracted Active Resource to its own gem. If you still need the featur ### Action Pack -* There is an upgrading cookie store `UpgradeSignatureToEncryptionCookieStore` which helps you upgrading apps that use `CookieStore` to the new default `EncryptedCookieStore`. To use this `CookieStore` set `Myapp::Application.config.session_store :upgrade_signature_to_encryption_cookie_store, key: '_myapp_session'` in `config/initializers/session_store.rb`. Additionally, add `Myapp::Application.config.secret_key_base = 'some secret'` in `config/initializers/secret_token.rb`. Do not remove `Myapp::Application.config.secret_token = 'some secret'`. +* Rails 4.0 introduces a new `UpgradeSignatureToEncryptionCookieStore` cookie store. This is useful for upgrading apps using the old default `CookieStore` to the new default `EncryptedCookieStore`. To use this transitional cookie store, you'll want to leave your existing `secret_token` in place, add a new `secret_key_base`, and change your `session_store` like so: + +```ruby + # config/initializers/session_store.rb + Myapp::Application.config.session_store :upgrade_signature_to_encryption_cookie_store, key: 'existing session key' + + # config/initializers/secret_token.rb + Myapp::Application.config.secret_token = 'existing secret token' + Myapp::Application.config.secret_key_base = 'new secret key base' +``` * Rails 4.0 removed the `ActionController::Base.asset_path` option. Use the assets pipeline feature. |