提交 ea7ef959 编写于 作者: A Aaron Patterson

partially expand the parameters to `match`

上级 ad1a8916
......@@ -1465,9 +1465,9 @@ def name_for_action(as, action) #:nodoc:
end
module Shorthand #:nodoc:
def match(*args)
if args.size == 1 && args.last.is_a?(Hash)
options = args.pop
def match(path, *rest)
if rest.empty? && Hash === path
options = path
path, to = options.find { |name, value| name.is_a?(String) }
options.merge!(:to => to).delete(path)
super(path, options)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册