我的路线中有这个:
resources :cvits
产生这些路线:
cvits GET /cvits(.:format) {:controller=>"cvits", :action=>"index"}
POST /cvits(.:format) {:controller=>"cvits", :action=>"create"}
new_cvit GET /cvits/new(.:format) {:controller=>"cvits", :action=>"new"}
edit_cvit GET /cvits/:id/edit(.:format) {:controller=>"cvits", :action=>"edit"}
cvit GET /cvits/:id(.:format) {:controller=>"cvits", :action=>"show"}
PUT /cvits/:id(.:format) {:controller=>"cvits", :action=>"update"}
DELETE /cvits/:id(.:format) {:controller=>"cvits", :action=>"destroy"}
但我希望我的网址是单数的(例如 /cvit/、/cvit/new、/cvit/:id)。改变这个最简单的方法是什么??????
谢谢!!!!
已解决:想通了,我做到了:
资源 :cvits, :path => 'cvit'