我有一个搜索路由,我想将其设为单数,但是当我指定单数路由时,它仍然会生成复数控制器路由,这是应该的吗?
resource :search
给我
search POST /search(.:format) {:action=>"create", :controller=>"searches"}
new_search GET /search/new(.:format) {:action=>"new", :controller=>"searches"}
edit_search GET /search/edit(.:format) {:action=>"edit", :controller=>"searches"}
GET /search(.:format) {:action=>"show", :controller=>"searches"}
PUT /search(.:format) {:action=>"update", :controller=>"searches"}
DELETE /search(.:format) {:action=>"destroy", :controller=>"searches"}
复数控制器“搜索”
我真的只有一条路线......创建搜索:
所以我做了: match "search" => "search#create"
我只是想知道将来我是否还应该保持控制器的复数形式?导轨 3.0.9