-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: configurable auto slug pluralization in the database #2836
feat: configurable auto slug pluralization in the database #2836
Conversation
|
You're totally right, I've added those!
So by setting pluralization to false, it should take exactly what you've provided as a slug for the document name in the database. The reason I set it as a global option is because I didn't really see a use-case for making it a per-collection setting. Why would someone want to disable it for some collections, but enable it for others? They might as well just set it to disabled globally and manually use pluralized slugs for collections where they want it to be enabled. One thing I'm hoping to do anyways (not decided yet!) is disabling pluralization by default globally in v2.0 as well. Just makes no sense to have that in the first place, in my opinion, it's confusing if the data is saved differently than what's specified in the slug. Pretty unexpected behavior. |
I agree with this. I would rather see a collection name property that overrides the default slug-derived naming instead of a global setting that modifies how collections are named. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pluralizeSlugs
we use "slug" for routing, not just mongoose collection naming. I don't think this property is the right approach.
Closed in favor of #3153 |
Fixes #2957
Description
Type of change
Checklist: