在路由指南中它说“路由文件中的单个条目,例如在您的应用程序中resources :photos创建七个八个不同的路由,所有映射到照片控制器: ”。
photos GET /photos(.:format) photos#index
POST /photos(.:format) photos#create
new_photo GET /photos/new(.:format) photos#new
edit_photo GET /photos/:id/edit(.:format) photos#edit
photo GET /photos/:id(.:format) photos#show
PATCH /photos/:id(.:format) photos#update
PUT /photos/:id(.:format) photos#update
DELETE /photos/:id(.:format) photos#destroy
如何使用match动词方法(get, post, patch, put, delete)创建等效路由?