aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 0a888505d2..47aed0273c 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1130,7 +1130,7 @@ module ActionDispatch
end
candidate = name.select(&:present?).join("_").presence
- candidate unless as.nil? && @set.routes.map(&:name).include?(candidate)
+ candidate unless as.nil? && @set.routes.find { |r| r.name == candidate }
end
end