Skip to content
Browse files

Merge pull request #10838 from gsamokovarov/routing-autoload_under

DRY-up ActionDispatch::Routing autoloads
  • Loading branch information...
2 parents 4b2cb4a + e4fd226 commit 733115dad2fb36a78170778c8664048e9ef7f876 @rafaelfranca rafaelfranca committed Jun 4, 2013
Showing with 7 additions and 5 deletions.
  1. +7 −5 actionpack/lib/action_dispatch/routing.rb
View
12 actionpack/lib/action_dispatch/routing.rb
@@ -246,11 +246,13 @@ module ActionDispatch
# Target specific controllers by prefixing the command with <tt>CONTROLLER=x</tt>.
#
module Routing
- autoload :Mapper, 'action_dispatch/routing/mapper'
- autoload :RouteSet, 'action_dispatch/routing/route_set'
- autoload :RoutesProxy, 'action_dispatch/routing/routes_proxy'
- autoload :UrlFor, 'action_dispatch/routing/url_for'
- autoload :PolymorphicRoutes, 'action_dispatch/routing/polymorphic_routes'
+ extend ActiveSupport::Autoload
+
+ autoload :Mapper
+ autoload :RouteSet
+ autoload :RoutesProxy
+ autoload :UrlFor
+ autoload :PolymorphicRoutes
SEPARATORS = %w( / . ? ) #:nodoc:
HTTP_METHODS = [:get, :head, :post, :patch, :put, :delete, :options] #:nodoc:

0 comments on commit 733115d

Please sign in to comment.
Something went wrong with that request. Please try again.