Forum: Ruby on Rails pluralize(0, 'people') error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
79ac86272d0c4e238e75379730cbaab1?d=identicon&s=25 ralxz (Guest)
on 2007-02-16 05:36
(Received via mailing list)
pluralize(0, 'people') = 0 peoples

Just thought I'd let you guys know. I'm new here so I don't know if
this is in the right section, but ya.
8da92d4ed91aa12535f6d870fa76b25e?d=identicon&s=25 Aaron (Guest)
on 2007-02-16 05:49
(Received via mailing list)
That's because 'people' is already plural.  From the api:

pluralize(count, singular, plural = nil)

Try this:
pluralize(0, 'person')

Aaron
D5145c421cd25af6fa577c15219add90?d=identicon&s=25 unknown (Guest)
on 2007-02-16 11:31
(Received via mailing list)
Well, people can be singular or plural. It can be the plural of person
or it
can describe a single group. The most famous example of this is in
Martin
Luther King's famous speech:
"...But I want you to know tonight, that we, as a people, will get to
the
Promised Land."

Rails gets it right in either case. Clever rails.

-Nathan

P.S. Also try this:

"people".singularize
13ea48f056b19349027d2f4a6921a46a?d=identicon&s=25 Jean-François (Guest)
on 2007-02-16 11:36
(Received via mailing list)
Nathan :
> Well, people can be singular or plural. It can be the plural of person
> or it can describe a single group. The most famous example of this
> is in Martin Luther King's famous speech:
> "...But I want you to know tonight, that we, as a people, will get to the
> Promised Land."
>
> Rails gets it right in either case. Clever rails.

Is Rails the Promised Land ? :)

   -- Jean-François.

--
À la renverse.
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2007-02-16 12:44
(Received via mailing list)
Jean-François wrote:

> Is Rails the Promised Land ? :)

Rails _are_ the Promised Land...

(Now try to write a paper about it with a grammar checker, folks!)

--
  Phlip
  http://c2.com/cgi/wiki?ZeekLand  <-- NOT a blog!!
34a7615f38496a5dafbb3e6b721c435e?d=identicon&s=25 Mohit Sindhwani (Guest)
on 2007-02-16 12:48
(Received via mailing list)
Phlip wrote:
>
Shouldn't it be:
Rails are the Promised Lands
Cde0427edc3138a49ec9f07a07b7079f?d=identicon&s=25 Niels Meersschaert (Guest)
on 2007-02-17 14:26
(Received via mailing list)
Try using pluralize(0, 'person').  Pluralize expects the singular as
the argument, not the plural.

Niels
70225136eacd3d870f64e03bff678655?d=identicon&s=25 Russell Norris (Guest)
on 2007-02-17 15:18
(Received via mailing list)
0 peoples is actually correct plural for people, as in nation or
ethnicity.
;)

RSL
This topic is locked and can not be replied to.