Rails: query parameter vs post parameter

前端 未结 4 661
闹比i
闹比i 2020-12-14 11:49

Suppose you have a url

localhost:3000?a=1

and in the request, you also have a post parameter

a=2

What wou

4条回答
  •  庸人自扰
    2020-12-14 12:49

    It would be 2. But for routing, it would match against the '1'.

    If you want, you can use request.GET and request.POST to access the get and post vars.

提交回复
热议问题