From 62383ddecc235334fdeff3995ab0e0470d055526 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 18 Aug 2015 16:30:01 -0700 Subject: don't touch internals We shouldn't be messing with the NamedRouteCollection internals. Just ask the object if the named route is in there. --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index f601395dca..c1134d16ad 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -635,7 +635,7 @@ module ActionDispatch # Query if the following named route was already defined. def has_named_route?(name) - @set.named_routes.routes[name.to_sym] + @set.named_routes.key? name end private -- cgit v1.2.3