scope
一、不使用 scope
resources :jjs jjs GET /jjs(.:format) jjs#index
POST /jjs(.:format) jjs#create
new_jj GET /jjs/new(.:format) jjs#new
edit_jj GET /jjs/:id/edit(.:format) jjs#edit
jj GET /jjs/:id(.:format) jjs#show
PATCH /jjs/:id(.:format) jjs#update
PUT /jjs/:id(.:format) jjs#update
DELETE /jjs/:id(.:format) jjs#destroy二、使用 scope,但不传递参数
scope "/admin" do
resources :iis
end iis GET /admin/iis(.:format) iis#index
POST /admin/iis(.:format) iis#create
new_ii GET /admin/iis/new(.:format) iis#new
edit_ii GET /admin/iis/:id/edit(.:format) iis#edit
ii GET /admin/iis/:id(.:format) iis#show
PATCH /admin/iis/:id(.:format) iis#update
PUT /admin/iis/:id(.:format) iis#update
DELETE /admin/iis/:id(.:format) iis#destroy三、使用 scope,并传递参数
最后更新于