Please sign in to comment.
Create a deprecation behavior that triggers a notification for deprec…
…ation 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.
- Loading branch information...
Showing with 52 additions and 10 deletions.
- +12 −9 activesupport/lib/active_support/deprecation/behaviors.rb
- +28 −0 activesupport/lib/active_support/railtie.rb
- +3 −0 railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
- +3 −0 railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
- +3 −0 railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
- +1 −0 railties/test/application/url_generation_test.rb
- +2 −1 railties/test/isolation/abstract_unit.rb