Best Way to Pluralize Nouns

18 views
Skip to first unread message

Kortina

unread,
Jul 2, 2010, 8:30:53 AM7/2/10
to Mustache
Suppose I have an array of arbitrary length with a user's friends. I
want to write out "0 friends" "1 friend" or "2 friends" depending on
the quantity, and I am unsure how to do this in a logicless way.

Chris Wanstrath

unread,
Jul 3, 2010, 4:16:26 PM7/3/10
to musta...@googlegroups.com

I would do it in your view class. That's where all the logic should live.

Reply all
Reply to author
Forward
0 new messages