aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/journey/route.rb4
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb
index f9e0e360c3..d44c3d31d7 100644
--- a/actionpack/lib/action_dispatch/journey/route.rb
+++ b/actionpack/lib/action_dispatch/journey/route.rb
@@ -8,6 +8,10 @@ module ActionDispatch
attr_accessor :precedence
+ def self.build(name, app, path, constraints, required_defaults, defaults)
+ new name, app, path, constraints, required_defaults, defaults
+ end
+
##
# +path+ is a path constraint.
# +constraints+ is a hash of constraints to be applied to this route.
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 2c9cab605f..e964bf59e0 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -144,7 +144,7 @@ module ActionDispatch
end
def make_route(name, precedence)
- route = Journey::Route.new(name,
+ route = Journey::Route.build(name,
application,
path,
conditions,