提交 0069965a 编写于 作者: Y yui-knk

Remove duplicated `Array#to_param`

`Array#to_param` is defind in active_support/core_ext/object/to_query.rb,
so we can call `to_param` if value is_a Array.
上级 90e893d4
......@@ -583,10 +583,8 @@ class Generator
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册