This issue is a (choose one):
Checklist before submitting:
Description
Bug reports:
I ran into some route name collisions after the 0.9.7 upgrade:
Given a List model with has_many :items, class_name: 'ListItem'
and a ListResource with has_many :items, class_name: 'ListItem'
and a ListItem model
and a ListItemResource:
The route for the items relationship on ListResource (to list_items#get_related_resources) is generated as list_items, which conflicts with the index route for ListItemResource (to list_items#index). Since there's no explicit name given for the ListItems resource route, this causes list_items_path to attempt to generate the route to list_items#get_related_resources and fail because it's missing required params.
It seems like this could be solved by adding a scope to the related route names similar to the one used for the in the relationships routes.
This issue is a (choose one):
Checklist before submitting:
I've included a complete bug report template. This step helps us and allows us to see the bug without trying to reproduce the problem from your description. It helps you because you will frequently detect if it's a problem specific to your project.(this didn't seem to exist in the 0.9 branch)Description
Bug reports:
I ran into some route name collisions after the 0.9.7 upgrade:
Given a
Listmodel withhas_many :items, class_name: 'ListItem'and a
ListResourcewithhas_many :items, class_name: 'ListItem'and a
ListItemmodeland a
ListItemResource:The route for the
itemsrelationship onListResource(tolist_items#get_related_resources) is generated aslist_items, which conflicts with theindexroute forListItemResource(tolist_items#index). Since there's no explicit name given for theListItemsresource route, this causeslist_items_pathto attempt to generate the route tolist_items#get_related_resourcesand fail because it's missing required params.It seems like this could be solved by adding a scope to the related route names similar to the one used for the in the
relationshipsroutes.