aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-18 16:30:01 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-18 16:30:01 -0700
commit62383ddecc235334fdeff3995ab0e0470d055526 (patch)
tree463048367f9c88a90781fdd0505fbdd625657ed9
parentd993cb362969caa2cb3b3f2f86ddf653d34dfb1b (diff)
downloadrails-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.rb2
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