diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-18 16:30:01 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-18 16:30:01 -0700 |
commit | 62383ddecc235334fdeff3995ab0e0470d055526 (patch) | |
tree | 463048367f9c88a90781fdd0505fbdd625657ed9 | |
parent | d993cb362969caa2cb3b3f2f86ddf653d34dfb1b (diff) | |
download | rails-62383ddecc235334fdeff3995ab0e0470d055526.tar.gz rails-62383ddecc235334fdeff3995ab0e0470d055526.tar.bz2 rails-62383ddecc235334fdeff3995ab0e0470d055526.zip |
don't touch internals
We shouldn't be messing with the NamedRouteCollection internals. Just
ask the object if the named route is in there.
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |