代码改变世界

rails路由常用请求类型

2013-07-08 23:09  张小萌  阅读(218)  评论(0编辑  收藏  举报
HTTP VerbPathactionused for
GET /photos index display a list of all photos
GET /photos/new new return an HTML form for creating a new photo
POST /photos create create a new photo
GET /photos/:id show display a specific photo
GET /photos/:id/edit edit return an HTML form for editing a photo
PATCH/PUT /photos/:id update update a specific photo
DELETE /photos/:id destroy delete a specific photo