Use the more intelligent pluralization method we built when generating findXsByField lookup functions.

This commit is contained in:
2020-01-02 18:46:03 -06:00
parent 934bb26cf3
commit 61e06842af
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ type
# TODO: more complete implementation
# see https://github.com/blakeembrey/pluralize
proc pluralize(name: string): string =
proc pluralize*(name: string): string =
if name[^2..^1] == "ey": return name[0..^3] & "ies"
if name[^1] == 'y': return name[0..^2] & "ies"
return name & "s"