Pluralize method Possible Bug

Hello Everyone

I am beginner to ruby but lately while working on a Rails Project I
stumbled on this anomaly.
Please have a look at this code-

*irb(main):001:0> "woman".pluralize*
*=> "women"*

*#Have a look at this one*
*irb(main):002:0> "alumnus".pluralize*
*=> "alumnus"*

*#Have a look at this one*
*irb(main):003:0> "alumni".pluralize*
*=> "alumnis"*

*irb(main):004:0> "cow".pluralize*
*=> "kine"*
*irb(main):005:0> "man".pluralize*
*=> "men"*
*irb(main):006:0> "cat".pluralize*
*=> "cats"*
*irb(main):007:0> "dolphin".pluralize*
*=> "dolphins"*
*irb(main):008:0> "dog".pluralize*
*=> "dogs"*
*irb(main):009:0> "Tigress".pluralize*
*=> "Tigresses"*

As you can see that for every other word except Alumnus(whose plural is
Alumni) and Alumni(which is itself a plural form) pluralize method returns
the exact plural word. Is this a bug in the method implementation?

I encountered this problem while naming my Rails Model Plural (Alumni) and
was amazed to find Table name in the database (supposed to be plural of
Model name according to the convention) to be Alumnis.

Can someone please also explain how the above Rails convention is
implemented i.e. Pluralization of Model Name as Table Name in Database

Thanks in Advance
Regards
*Varun Wachaspati J*
*B.E.(Hons.)Computer Science | LinkedIn
<https://mailtrack.io/trace/link/3eb2efe9572b8b1501c11c5ecbf771d33ef3b136> |
+91-8094068111*

*Birla Institute of Technology & Science,* Pilani

Hi Varun Wachaspati,

That's more a Rails question than a Ruby one.
But, you could check Rails Internationalization (I18n) API — Ruby on Rails Guides
And
Ruby on Rails: How do you explicitly define plural names and singular names in Rails? - Stack Overflow

Abinoam Jr.

···

On Sun, Dec 21, 2014 at 8:07 AM, Varun Wachaspati <varunwachaspati@gmail.com > wrote:

Hello Everyone

I am beginner to ruby but lately while working on a Rails Project I
stumbled on this anomaly.
Please have a look at this code-

*irb(main):001:0> "woman".pluralize*
*=> "women"*

*#Have a look at this one*
*irb(main):002:0> "alumnus".pluralize*
*=> "alumnus"*

*#Have a look at this one*
*irb(main):003:0> "alumni".pluralize*
*=> "alumnis"*

*irb(main):004:0> "cow".pluralize*
*=> "kine"*
*irb(main):005:0> "man".pluralize*
*=> "men"*
*irb(main):006:0> "cat".pluralize*
*=> "cats"*
*irb(main):007:0> "dolphin".pluralize*
*=> "dolphins"*
*irb(main):008:0> "dog".pluralize*
*=> "dogs"*
*irb(main):009:0> "Tigress".pluralize*
*=> "Tigresses"*

As you can see that for every other word except Alumnus(whose plural is
Alumni) and Alumni(which is itself a plural form) pluralize method returns
the exact plural word. Is this a bug in the method implementation?

I encountered this problem while naming my Rails Model Plural (Alumni) and
was amazed to find Table name in the database (supposed to be plural of
Model name according to the convention) to be Alumnis.

Can someone please also explain how the above Rails convention is
implemented i.e. Pluralization of Model Name as Table Name in Database

Thanks in Advance
Regards
*Varun Wachaspati J*
*B.E.(Hons.)Computer Science | LinkedIn
<https://mailtrack.io/trace/link/3eb2efe9572b8b1501c11c5ecbf771d33ef3b136&gt; |
+91-8094068111 <%2B91-8094068111>*

*Birla Institute of Technology & Science,* Pilani