Rails: URL/path with parameters

后端 未结 5 745
野性不改
野性不改 2021-02-03 18:47

I would like to produce a URL as

/swimming/students/get_times/2013-01-01/2013-02-02

from this route

get_class_swimming_students         


        
5条回答
  •  别跟我提以往
    2021-02-03 19:14

    You can also combine named parameters and not named parameters like this:

    get_class_swimming_students_path('2013-01-01', '2013-02-02', gender: 'M')
    

提交回复
热议问题