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:
bodhi 2010-06-30 12:50:41 +10:00 committed by José Valim
parent 9ab8cfc21a
commit 2eaae1f50b

@ -25,14 +25,16 @@ class Railtie < Rails::Railtie
if defaults.key?(env) if defaults.key?(env)
msg = "You did not specify how you would like Rails to report " \ msg = "You did not specify how you would like Rails to report " \
"deprecation notices for your #{env} environment, please " \ "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 warn msg
ActiveSupport::Deprecation.behavior = defaults[env] ActiveSupport::Deprecation.behavior = defaults[env]
else else
msg = "You did not specify how you would like Rails to report " \ msg = "You did not specify how you would like Rails to report " \
"deprecation notices for your #{env} environment, please " \ "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 warn msg
ActiveSupport::Deprecation.behavior = :stderr ActiveSupport::Deprecation.behavior = :stderr
@ -55,4 +57,4 @@ class Railtie < Rails::Railtie
Time.zone_default = zone_default Time.zone_default = zone_default
end end
end end
end end