module ActionDispatch::Routing::Mapper::Resources

def match(path, *rest)

match 'path', 'otherpath', on: :member, via: :get
match 'path', to: 'controller#action'
match 'path' => 'controller#action'
def match(path, *rest)
  if rest.empty? && Hash === path
    options  = path
    path, to = options.find { |name, _value| name.is_a?(String) }
    options[:to] = to
    options.delete(path)
    paths = [path]
  else
    options = rest.pop || {}
    paths = [path] + rest
  end
  options[:anchor] = true unless options.key?(:anchor)
  if options[:on] && !VALID_ON_OPTIONS.include?(options[:on])
    raise ArgumentError, "Unknown scope #{on.inspect} given to :on"
  end
  if @scope[:controller] && @scope[:action]
    options[:to] ||= "#{@scope[:controller]}##{@scope[:action]}"
  end
  paths.each do |_path|
    route_options = options.dup
    route_options[:path] ||= _path if _path.is_a?(String)
    path_without_format = _path.to_s.sub(/\(\.:format\)$/, '')
    if using_match_shorthand?(path_without_format, route_options)
      route_options[:to] ||= path_without_format.gsub(%r{^/}, "").sub(%r{/([^/]*)$}, '#\1')
    end
    decomposed_match(_path, route_options)
  end
  self
end