From d4c7d3fd94e5a885a6366eaeb3b908bb58ffd4db Mon Sep 17 00:00:00 2001 From: wycats Date: Tue, 29 Jun 2010 12:18:17 -0700 Subject: Create a deprecation behavior that triggers a notification for deprecation notices, and make the behaviors independent of the environment names. * In Rails 2.3 apps being upgraded, you will need to add the deprecation configuration to each of your environments. Failing to do so will result in the same behavior as Rails 2.3, but with an outputted warning to provide information on how to set up the setting. * New Rails 3 applications generate the setting * The notification style will send deprecation notices using ActiveSupport::Notifications. Third-party tools can listen in to these notifications to provide a streamlined view of the deprecation notices occurring in your app. * The payload in the notification is the deprecation warning itself as well as the callstack from the point that triggered the notification. --- railties/test/application/url_generation_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'railties/test/application/url_generation_test.rb') diff --git a/railties/test/application/url_generation_test.rb b/railties/test/application/url_generation_test.rb index 72cae23985..2b6ec26cd0 100644 --- a/railties/test/application/url_generation_test.rb +++ b/railties/test/application/url_generation_test.rb @@ -16,6 +16,7 @@ module ApplicationTests class MyApp < Rails::Application config.secret_token = "3b7cd727ee24e8444053437c36cc66c4" config.session_store :cookie_store, :key => "_myapp_session" + config.active_support.deprecation = :log end MyApp.initialize! -- cgit v1.2.3