When prefixing nesting resources, I think that a named route that includes an action should start with that action. For example, given Groups with nested Users
new_group_user_path(@group)
would be more intuitive than
group_new_user_path(@group)
This patch adds support for named routes in the proposed new style while preserving the existing named routes.
Note that some of the existing generation of named routes was not being tested before (i.e. commenting out some lines in resources.rb caused no failures). I added tests for the existing named routes before adding tests for the new named routes.
Also, I didn't want to replace the existing names, but rather add these new alternatives, thinking that the existing names would be deprecated first, rather than removed. This caused ResourcesTest#test_restful_routes_dont_generate_duplicates to fail. I commented that test out with an explanation of why it's commented out. Assuming that you accept the patch otherwise, this should probably get deleted.