Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add note of which configuration option to set in deprecation warning …
…message [rails#5012 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
bodhi authored and josevalim committed Jun 30, 2010
1 parent 9ab8cfc commit 2eaae1f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions activesupport/lib/active_support/railtie.rb
Expand Up @@ -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
Expand All @@ -55,4 +57,4 @@ class Railtie < Rails::Railtie
Time.zone_default = zone_default
end
end
end
end

0 comments on commit 2eaae1f

Please sign in to comment.