Rails Put vs Post

后端 未结 4 1437
自闭症患者
自闭症患者 2021-01-04 06:12

I have been reading up on the difference between put and post requests and I have some related questions as it pertains to rails: I would like to change one specific field i

4条回答
  •  礼貌的吻别
    2021-01-04 06:34

    PUT and POST are HTTP methods.

    In the routes.rb you have to map method and controller#action. In your class you define 3 times the same method. So if you want map these actions to a HTTP method you can't.

    You going to change the name of each method and change the implementation to the model class.

提交回复
热议问题