Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve secret_token deprecation message

  • Loading branch information...
commit 219e831d15b10eef43a7a65262bd0938e6baaabb 1 parent 257b3f6
Santiago Pastorino spastorino authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 railties/lib/rails/application.rb
7 railties/lib/rails/application.rb
View
@@ -135,9 +135,10 @@ def key_generator
def env_config
@env_config ||= begin
if config.secret_key_base.nil?
- ActiveSupport::Deprecation.warn "You didn't set config.secret_key_base. " +
- "This should be used instead of the old deprecated config.secret_token. " +
- "Set config.secret_key_base instead of config.secret_token in config/initializers/secret_token.rb"
+ ActiveSupport::Deprecation.warn "You didn't set config.secret_key_base in config/initializers/secret_token.rb file. " +
+ "This should be used instead of the old deprecated config.secret_token in order to use the new EncryptedCookieStore. " +
+ "To convert safely to the encrypted store (without losing existing cookies and sessions), see http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#action-pack"
+
if config.secret_token.blank?
raise "You must set config.secret_key_base in your app's config"
end

4 comments on commit 219e831

Santiago Pastorino
Owner

We probably need a CONSTANT for guides url
in master Rails::GUIDES_URL = "http://edgeguides.rubyonrails.org"
in *-stable Rails::GUIDES_URL = "http://guides.rubyonrails.org"
and as part of the release process when we create *-stable branches we would need to change from edgeguides to guides

Santiago Pastorino
Owner

/cc @tenderlove

We are pointing from the code mostly to guides.rubyonrails.org but here and here we are not

Santiago Pastorino
Owner

I've fixed it for now 3755a49 unsure if the constant worth

Please sign in to comment.
Something went wrong with that request. Please try again.