diff options
author | Xavier Shay <xavier@rhnh.net> | 2013-07-07 14:34:46 -0700 |
---|---|---|
committer | Xavier Shay <xavier@rhnh.net> | 2015-08-07 20:06:24 -0700 |
commit | 2992b1c04c555c6483245257eab16026dd0fd889 (patch) | |
tree | 7b42732c971e8d0e457789f6dc9f7ef58938beee /actionpack/lib | |
parent | f26ae7d10f9b890a9ac5de70f0be4a9cf9149233 (diff) | |
download | rails-2992b1c04c555c6483245257eab16026dd0fd889.tar.gz rails-2992b1c04c555c6483245257eab16026dd0fd889.tar.bz2 rails-2992b1c04c555c6483245257eab16026dd0fd889.zip |
Allow a custom dispatcher to be provided to routing.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index e885bfa770..a8fb5aade3 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -317,7 +317,7 @@ module ActionDispatch attr_accessor :formatter, :set, :named_routes, :default_scope, :router attr_accessor :disable_clear_and_finalize, :resources_path_names - attr_accessor :default_url_options + attr_accessor :default_url_options, :dispatcher_class attr_reader :env_key alias :routes :set @@ -360,6 +360,7 @@ module ActionDispatch @set = Journey::Routes.new @router = Journey::Router.new @set @formatter = Journey::Formatter.new @set + @dispatcher_class = Routing::RouteSet::Dispatcher end def relative_url_root @@ -418,7 +419,7 @@ module ActionDispatch end def dispatcher(defaults) - Routing::RouteSet::Dispatcher.new(defaults) + dispatcher_class.new(defaults) end module MountedHelpers |