diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-06 17:27:42 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-06 17:27:42 -0300 |
commit | 1b9ecef3588db922dc1b3dc9da66c13265fbd421 (patch) | |
tree | fbebcc4d8de2a30f21b81422c170ebcfef790575 | |
parent | 19d46e849e858b9f9e3be35faec4cd38e04cdae7 (diff) | |
parent | 0069965a84275861d7ba87a4f60cdac081cc92f4 (diff) | |
download | rails-1b9ecef3588db922dc1b3dc9da66c13265fbd421.tar.gz rails-1b9ecef3588db922dc1b3dc9da66c13265fbd421.tar.bz2 rails-1b9ecef3588db922dc1b3dc9da66c13265fbd421.zip |
Merge pull request #21061 from yui-knk/refactor/route_set
Remove duplicated `Array#to_param`
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index c968381c26..f3d7a234d7 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -587,10 +587,8 @@ module ActionDispatch PARAMETERIZE = lambda do |name, value| if name == :controller value - elsif value.is_a?(Array) - value.map(&:to_param).join('/') - elsif param = value.to_param - param + else + value.to_param end end |