1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #20378 from vngrs/fix_doc_of_match_method

match method doc fix [ci skip]
This commit is contained in:
Kasper Timm Hansen 2015-05-30 16:56:36 +02:00
commit eefd4c0d28

View file

@ -1450,9 +1450,12 @@ module ActionDispatch
parent_resource.instance_of?(Resource) && @scope[:shallow]
end
# match 'path' => 'controller#action'
# match 'path', to: 'controller#action'
# match 'path', 'otherpath', on: :member, via: :get
# Matches a url pattern to one or more routes.
# For more information, see match[rdoc-ref:Base#match].
#
# match 'path' => 'controller#action', via: patch
# match 'path', to: 'controller#action', via: :post
# match 'path', 'otherpath', on: :member, via: :get
def match(path, *rest)
if rest.empty? && Hash === path
options = path