Deprecate ActionController::UrlWriter properly

This commit is contained in:
wycats
2010-08-03 12:41:18 -07:00
parent 43cc69cb65
commit 84703be5ff
2 changed files with 10 additions and 1 deletions

View File

@@ -35,10 +35,10 @@ module ActionController
end
autoload :Dispatcher, 'action_controller/deprecated/dispatcher'
autoload :UrlWriter, 'action_controller/deprecated/url_writer'
autoload :Integration, 'action_controller/deprecated/integration_test'
autoload :IntegrationTest, 'action_controller/deprecated/integration_test'
autoload :PerformanceTest, 'action_controller/deprecated/performance_test'
autoload :UrlWriter, 'action_controller/deprecated'
autoload :Routing, 'action_controller/deprecated'
autoload :TestCase, 'action_controller/test_case'

View File

@@ -0,0 +1,9 @@
module ActionController
module UrlWriter
def self.included(klass)
ActiveSupport::Deprecation.warn "include ActionController::UrlWriter is deprecated. Instead, " \
"include Rails.application.routes.url_helpers"
klass.class_eval { include Rails.application.routes.url_helpers }
end
end
end