Repository navigation
Change :model-name_id to :model_name_id in defining routes doc - #1168
Merged
Merged
Conversation
… models should name their dynamic segment
jenweber
approved these changes
Nov 15, 2019
jenweber
left a comment
Contributor
There was a problem hiding this comment.
Thanks for your help with this! I think the fact that {path: 'blog-posts/blog-post_id'} trips up linting is confirmation that we should make this change.
In case you do more work in the future, for most PRs, you can submit changes to just the release version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
:model-name_idimplies that a multiword model would be dasherized with_idappended at the end. I think this is incorrect?This doesn't work with the routes-segments-snake-case lint rule which will complain about the dash in the dynamic segment, and it also means that you'd need to use
params['blog-post_id']instead ofparams.blog_post_idwhich I don't think was intended by the original author here.