Calling map.resources :users creates url generators for the collection (e.g., users_url) and url generators for members of the collection (e.g., user_url). However, for resources that have names which are uncountable, such as "sheep", the collection and member url generators result in a name clash. Ticket #7422 has a test case which demonstrates a bug due to this behavior. However, changeset [6062], which patches up the bug in ticket #7229, suggests that the solution cannot overload one method for both the collection and member url generators. Instead, the method names must differ for the collection url generator and the member url generator.
The patch that is attached, disambiguates the two by appending "_collection" to the resource name for the collection url generators. This results in sheep_collection_url for the sheep collection, and sheep_url for the member. Note that this change only applies to resources with names that are uncountable. Applying this change creates a need for a patch to the scaffold_resource generator to ensure that it calls the "_collection" versions when necessary.