提交 f10b38bb 编写于 作者: M Mohamed Wael Khobalatte 提交者: Rafael Mendonça França

Ensure named path params are symbols (Fixes #16958)

上级 0863c924
......@@ -287,6 +287,7 @@ def handle_positional_args(controller_options, inner_options, args, result, path
}
end
inner_options.symbolize_keys!
result.merge!(inner_options)
end
end
......
......@@ -80,6 +80,14 @@ def call(env)
assert_equal '/foo/1/bar/2', url_helpers.foo_bar_path(2, foo_id: 1)
end
test "stringified controller and action keys are properly symbolized" do
draw do
root 'foo#bar'
end
assert_equal '/', url_helpers.root_path('controller' => 'foo', 'action' => 'bar')
end
private
def draw(&block)
@set.draw(&block)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册