add note of which configuration option to set in deprecation warning message [#5012 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
9ab8cfc21a
commit
2eaae1f50b
@ -25,14 +25,16 @@ class Railtie < Rails::Railtie
|
||||
if defaults.key?(env)
|
||||
msg = "You did not specify how you would like Rails to report " \
|
||||
"deprecation notices for your #{env} environment, please " \
|
||||
"set it to :#{defaults[env]} at config/environments/#{env}.rb"
|
||||
"set config.active_support.deprecation to :#{defaults[env]} " \
|
||||
"at config/environments/#{env}.rb"
|
||||
|
||||
warn msg
|
||||
ActiveSupport::Deprecation.behavior = defaults[env]
|
||||
else
|
||||
msg = "You did not specify how you would like Rails to report " \
|
||||
"deprecation notices for your #{env} environment, please " \
|
||||
"set it to :log, :notify or :stderr at config/environments/#{env}.rb"
|
||||
"set config.active_support.deprecation to :log, :notify or " \
|
||||
":stderr at config/environments/#{env}.rb"
|
||||
|
||||
warn msg
|
||||
ActiveSupport::Deprecation.behavior = :stderr
|
||||
@ -55,4 +57,4 @@ class Railtie < Rails::Railtie
|
||||
Time.zone_default = zone_default
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user