Add support for shallow nested resources #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey! Just tried out this package and it seems great, but I run into a problem where shallow nested resources are not working correctly. I tried to fix this with limited amount of time and knowledge about this package, but seems like I got the tests to pass, so let me know if you think this is ok.
Basically if we have something like this (same as in the test) and we visit
notes/1/edit
, then it wouldn't display anything at all, because in the registry it's registered asusers.notes.edit
and notnotes.edit
, but the route when it is resolved has name ofnotes.edit
. So this change basically makes sure it is registered with shallow name.Let me know what you think 👍