diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-14 18:04:49 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-14 18:06:48 -0700 |
commit | a293812bffbc6e634e1a6e6794e9dec537d522a3 (patch) | |
tree | 9fe55f6939904b9244599e625de58c77b62f1dbb /actionpack/lib/action_dispatch/journey/routes.rb | |
parent | 09d846e7b81cb9e5ff891c91874b4108ce3156ec (diff) | |
download | rails-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/journey/routes.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/routes.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/journey/routes.rb b/actionpack/lib/action_dispatch/journey/routes.rb index dacb0ccf48..4770b8b7cc 100644 --- a/actionpack/lib/action_dispatch/journey/routes.rb +++ b/actionpack/lib/action_dispatch/journey/routes.rb @@ -5,11 +5,10 @@ module ActionDispatch class Routes # :nodoc: include Enumerable - attr_reader :routes, :named_routes, :custom_routes, :anchored_routes + attr_reader :routes, :custom_routes, :anchored_routes def initialize @routes = [] - @named_routes = {} @ast = nil @anchored_routes = [] @custom_routes = [] @@ -37,7 +36,6 @@ module ActionDispatch routes.clear anchored_routes.clear custom_routes.clear - named_routes.clear end def partition_route(route) @@ -72,7 +70,6 @@ module ActionDispatch route.precedence = routes.length routes << route - named_routes[name] = route if name && !named_routes[name] partition_route(route) clear_cache! route |