Study Notes and RESTful Rails CURD

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_42215775/article/details/102756463

CRUD are the four common additions and deletions to change search operation:
C: the Create (add, using POST)
R: the Read (reading, using GET)
U: Update (update, use PUT)
D: the destroy (delete, use DELETE)

RESTful HTTP is the use of action, to encapsulate the behavior of CURD:
a controller which, we defined the seven action and four pages

7 Action:
index: Home. All the information used to display, select to jump to the individual pages. (Using GET)
Show: Display page. To show the details of the item. (Using GET)
new new: new page. Which is usually a form that can be sent after filling out. (Using GET)
Edit: edit page. Which is usually also a form, showing the contents of existing data, it can be sent after editing. (Using GET)
the Create: generate content. sending out new forms to create the action, add a packet of data. (Using POST)
Update: updates. edit send out a form to update this action, updating a packet of data. (Using PUT)
the destroy: delete the content. Send delete request, delete the pen data. (Use DELETE)

Guess you like

Origin blog.csdn.net/weixin_42215775/article/details/102756463