Skip to content
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

Component names not being pluralized correctly #2

Open
JPRoland opened this issue Aug 18, 2019 · 0 comments
Open

Component names not being pluralized correctly #2

JPRoland opened this issue Aug 18, 2019 · 0 comments

Comments

@JPRoland
Copy link

JPRoland commented Aug 18, 2019

I was messing around with Thruster and noticed that CLI doesn't handle pluralizing component names very well. It just adds an s to the end of the word, even if the word already ends with an s. Running the example command to create a Users component results in a userss.rs model file and userss table name, as well as a userss component directory.

I know it doesn't really affect how anything works, it just ends up looking odd.

The Inflector crate, appears to be able to handle pluralizing words, as well as supporting changing between different cases and many other word transformations.

If you're open to pull requests I could take a crack at incorporating that crate, or possibly just making a pluralize function, but using the crate would be much easier thanks to the wonderful weirdness of the English language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant