aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-14 18:04:49 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-14 18:06:48 -0700
commita293812bffbc6e634e1a6e6794e9dec537d522a3 (patch)
tree9fe55f6939904b9244599e625de58c77b62f1dbb /actionpack/lib/action_dispatch/routing
parent09d846e7b81cb9e5ff891c91874b4108ce3156ec (diff)
downloadrails-a293812bffbc6e634e1a6e6794e9dec537d522a3.tar.gz
rails-a293812bffbc6e634e1a6e6794e9dec537d522a3.tar.bz2
rails-a293812bffbc6e634e1a6e6794e9dec537d522a3.zip
only keep one hash of named routes
The outer router object already keeps a hash of named routes, so we should just use that.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 4f698c84ab..30e308119d 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -143,6 +143,7 @@ module ActionDispatch
end
def key?(name)
+ return unless name
routes.key? name.to_sym
end
@@ -356,7 +357,7 @@ module ActionDispatch
@set = Journey::Routes.new
@router = Journey::Router.new @set
- @formatter = Journey::Formatter.new @set
+ @formatter = Journey::Formatter.new self
@dispatcher_class = Routing::RouteSet::Dispatcher
end