Permalink
Browse files

Improve UpgradeSignatureToEncryptionCookieStore docs

I suck at English, please help me reviewing this <3 <3 <3
[ci skip]
  • Loading branch information...
1 parent 5d239ac commit d56cfadfe2c7547bbfd14b9e48ea484b35a53034 @spastorino spastorino committed Nov 16, 2012
Showing with 14 additions and 1 deletion.
  1. +14 −1 actionpack/lib/action_dispatch/middleware/session/cookie_store.rb
@@ -96,8 +96,21 @@ def cookie_jar(env)
# This cookie store helps you upgrading apps that use +CookieStore+ to the new default +EncryptedCookieStore+
#
- # To use this CookieStore set MyApp.config.session_store :upgrade_signature_to_encryption_cookie_store, key: '_myapp_session'
+ # To use this CookieStore use this
@rafaelfranca

rafaelfranca Nov 18, 2012

Owner

I think is better to use set instead of use this

+ #
+ # Myapp::Application.config.session_store :upgrade_signature_to_encryption_cookie_store, key: '_myapp_session'
+ #
# in your config/initializers/session_store.rb
+ #
+ # You will also need to go to your config/initializers/secret_token.rb
@rafaelfranca

rafaelfranca Nov 18, 2012

Owner

You will also need to add

Myapp::Application.config.secret_key_base = 'some secret'

in your config/initializers/secret_token.rb

+ #
+ # leave what you already had in your 3.2.x app
+ #
+ # Myapp::Application.config.secret_token = 'some secret'
+ #
+ # and also set secret_key_base to allow Rails to upgrade your users cookies
+ #
+ # Myapp::Application.config.secret_key_base = 'some secret'
class UpgradeSignatureToEncryptionCookieStore < EncryptedCookieStore
private

4 comments on commit d56cfad

Owner

rafaelfranca replied Nov 18, 2012

I think this text should be in the upgrading guide. What do you think?

Owner

spastorino replied Nov 18, 2012

Agree with everything bro, if you want to do it go ahead. If not I will do this soon :)

Owner

rafaelfranca replied Nov 19, 2012

❤️

Please sign in to comment.