diff options
author | José Valim <jose.valim@gmail.com> | 2010-09-30 07:25:06 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-30 07:25:06 +0200 |
commit | 69f97f469747777ed1c457715f5361f6b8a0ab7b (patch) | |
tree | 9f7c289cecc6e9242fe38d3f6276db852ecd25eb /actionpack/lib/action_dispatch | |
parent | 31752f3516e5977b459cc713ae50515b20fda67b (diff) | |
download | rails-69f97f469747777ed1c457715f5361f6b8a0ab7b.tar.gz rails-69f97f469747777ed1c457715f5361f6b8a0ab7b.tar.bz2 rails-69f97f469747777ed1c457715f5361f6b8a0ab7b.zip |
Use .find here as it is simpler and faster.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-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 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 |