1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix secrets.yml path in exception message

The file is config/secrets.yml, not config/initializers/secrets.yml.
This commit is contained in:
Carlos Antonio da Silva 2014-01-20 08:56:08 -02:00
parent 06849fd4d0
commit f63c6e57ee

View file

@ -57,18 +57,16 @@ module ActiveSupport
# secret they've provided is at least 30 characters in length. # secret they've provided is at least 30 characters in length.
def ensure_secret_secure(secret) def ensure_secret_secure(secret)
if secret.blank? if secret.blank?
raise ArgumentError, "A secret is required to generate an " + raise ArgumentError, "A secret is required to generate an integrity hash " \
"integrity hash for cookie session data. Set a " + "for cookie session data. Set a secret_key_base of at least " \
"secret_key_base of at least " + "#{SECRET_MIN_LENGTH} characters in config/secrets.yml."
"#{SECRET_MIN_LENGTH} characters " +
"in config/initializers/secrets.yml"
end end
if secret.length < SECRET_MIN_LENGTH if secret.length < SECRET_MIN_LENGTH
raise ArgumentError, "Secret should be something secure, " + raise ArgumentError, "Secret should be something secure, " \
"like \"#{SecureRandom.hex(16)}\". The value you " + "like \"#{SecureRandom.hex(16)}\". The value you " \
"provided, \"#{secret}\", is shorter than the minimum length " + "provided, \"#{secret}\", is shorter than the minimum length " \
"of #{SECRET_MIN_LENGTH} characters" "of #{SECRET_MIN_LENGTH} characters."
end end
end end
end end