diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index ca0e5d6ff6..b7250d193f 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -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' diff --git a/actionpack/lib/action_controller/deprecated/url_writer.rb b/actionpack/lib/action_controller/deprecated/url_writer.rb new file mode 100644 index 0000000000..d901cb4971 --- /dev/null +++ b/actionpack/lib/action_controller/deprecated/url_writer.rb @@ -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