This issues was tested in a new rails project using the latest
rails master.
Inside the routes.rb file, this no longer works using the Rails
3 Router. Here is an example with two resources. One uses the
depreciated router and works as expected. The other uses the Rails
3 router and does not work as expected. The generated route names
are incorrectly singularized by the Rails 3 router
(new_teeth instead of correct new_tooth) but in
the depreciated router they are correctly singularized
(new_ox instead of the incorrect new_oxen).
Foo::Application.routes.draw do |map|
resources :teeth, :singular => :tooth
map.resources :oxen, :singular => :ox
end
rake routes
GET /teeth(.:format) {:action=>"index", :controller=>"teeth"}
teeths POST /teeth(.:format) {:action=>"create", :controller=>"teeth"}
new_teeth GET /teeth/new(.:format) {:action=>"new", :controller=>"teeth"}
GET /teeth/:id(.:format) {:action=>"show", :controller=>"teeth"}
PUT /teeth/:id(.:format) {:action=>"update", :controller=>"teeth"}
teeth DELETE /teeth/:id(.:format) {:action=>"destroy", :controller=>"teeth"}
edit_teeth GET /teeth/:id/edit(.:format) {:action=>"edit", :controller=>"teeth"}
oxen GET /oxen(.:format) {:controller=>"oxen", :action=>"index"}
POST /oxen(.:format) {:controller=>"oxen", :action=>"create"}
new_ox GET /oxen/new(.:format) {:controller=>"oxen", :action=>"new"}
edit_ox GET /oxen/:id/edit(.:format) {:controller=>"oxen", :action=>"edit"}
ox GET /oxen/:id(.:format) {:controller=>"oxen", :action=>"show"}
PUT /oxen/:id(.:format) {:controller=>"oxen", :action=>"update"}
DELETE /oxen/:id(.:format) {:controller=>"oxen", :action=>"destroy"}
So is this depreciated behavior? Should all of our inflections
be placed in the Inflector? If so, then the Routing Guide should be
updated to reflect that. If not, than I can submit a patch.