Skip to content

Commit

Permalink
Improve UpgradeSignatureToEncryptionCookieStore docs
Browse files Browse the repository at this point in the history
I suck at English, please help me reviewing this <3 <3 <3
[ci skip]
  • Loading branch information
spastorino committed Nov 16, 2012
1 parent 5d239ac commit d56cfad
Showing 1 changed file with 14 additions and 1 deletion.
Expand Up @@ -96,8 +96,21 @@ def cookie_jar(env)


# This cookie store helps you upgrading apps that use +CookieStore+ to the new default +EncryptedCookieStore+ # 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

This comment has been minimized.

Copy link
@rafaelfranca

rafaelfranca Nov 18, 2012

Member

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 # in your config/initializers/session_store.rb
#
# You will also need to go to your config/initializers/secret_token.rb

This comment has been minimized.

Copy link
@rafaelfranca

rafaelfranca Nov 18, 2012

Member

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 class UpgradeSignatureToEncryptionCookieStore < EncryptedCookieStore
private private


Expand Down

4 comments on commit d56cfad

@rafaelfranca
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@spastorino
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@spastorino
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafaelfranca
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Please sign in to comment.