diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-01-20 08:56:08 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-01-20 08:58:43 -0200 |
commit | f63c6e57ee7b777ffe8d9e8ba907cd4b36f4040d (patch) | |
tree | 0f3b3d27080bbe7d7ae99e8174603a9a6048f426 | |
parent | 06849fd4d02a74611011e0da33c76ab6a716e88e (diff) | |
download | rails-f63c6e57ee7b777ffe8d9e8ba907cd4b36f4040d.tar.gz rails-f63c6e57ee7b777ffe8d9e8ba907cd4b36f4040d.tar.bz2 rails-f63c6e57ee7b777ffe8d9e8ba907cd4b36f4040d.zip |
Fix secrets.yml path in exception message
The file is config/secrets.yml, not config/initializers/secrets.yml.
-rw-r--r-- | activesupport/lib/active_support/key_generator.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/key_generator.rb b/activesupport/lib/active_support/key_generator.rb index 58a2289b08..51d2da3a79 100644 --- a/activesupport/lib/active_support/key_generator.rb +++ b/activesupport/lib/active_support/key_generator.rb @@ -57,18 +57,16 @@ module ActiveSupport # secret they've provided is at least 30 characters in length. def ensure_secret_secure(secret) if secret.blank? - raise ArgumentError, "A secret is required to generate an " + - "integrity hash for cookie session data. Set a " + - "secret_key_base of at least " + - "#{SECRET_MIN_LENGTH} characters " + - "in config/initializers/secrets.yml" + raise ArgumentError, "A secret is required to generate an integrity hash " \ + "for cookie session data. Set a secret_key_base of at least " \ + "#{SECRET_MIN_LENGTH} characters in config/secrets.yml." end if secret.length < SECRET_MIN_LENGTH - raise ArgumentError, "Secret should be something secure, " + - "like \"#{SecureRandom.hex(16)}\". The value you " + - "provided, \"#{secret}\", is shorter than the minimum length " + - "of #{SECRET_MIN_LENGTH} characters" + raise ArgumentError, "Secret should be something secure, " \ + "like \"#{SecureRandom.hex(16)}\". The value you " \ + "provided, \"#{secret}\", is shorter than the minimum length " \ + "of #{SECRET_MIN_LENGTH} characters." end end end |