Why can't I use a param called “action”?

前端 未结 4 1396
花落未央
花落未央 2020-12-20 15:32

Is \"action\" as a input field name forbidden? Because everything works except the assignment of the \"action\" param.

4条回答
  •  无人及你
    2020-12-20 15:47

    because action, controller are prohibited words.

    Look around debug params

    --- !map:ActiveSupport::HashWithIndifferentAccess 
    action: index
    controller: main
    

    so you can't use those params. Because they will be REWRITED AUTOMATICALLY

提交回复
热议问题