You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 ans
. Running the example command to create aUsers
component results in auserss.rs
model file anduserss
table name, as well as auserss
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.
The text was updated successfully, but these errors were encountered: