提交 5b53a069 编写于 作者: J Jeremy Kemper

Ensure we have an array to collect

上级 5eb893f7
...@@ -249,7 +249,7 @@ def interpolation_chunk(value_code = "#{local_name}") ...@@ -249,7 +249,7 @@ def interpolation_chunk(value_code = "#{local_name}")
end end
def extract_value def extract_value
"#{local_name} = hash[:#{key}] && hash[:#{key}].collect { |path_component| URI.escape(path_component.to_param, ActionController::Routing::Segment::UNSAFE_PCHAR) }.to_param #{"|| #{default.inspect}" if default}" "#{local_name} = hash[:#{key}] && Array(hash[:#{key}]).collect { |path_component| URI.escape(path_component.to_param, ActionController::Routing::Segment::UNSAFE_PCHAR) }.to_param #{"|| #{default.inspect}" if default}"
end end
def default def default
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册