How to correct pluralization?

Hi all!

Is it possible to add rules to rails' inflector so I can have

posses -> posse (thinks it's "poss")

and

hero -> heroes (thinks it's "heros")

Thank you!

Hi --

Add in your environment.rb:
Inflector.inflections do |inflect|
   inflect.irregular 'posses', 'posse'
   inflect.irregular 'hero', 'heroes'
end

P.S.: what's poss/posses ???

Sounds like a pretty cool app...

A "posse" is a group of armed men, generally who would go out and
round up a wanted criminal. Circa 1800's in the American West.

Oh, yes! Party Posse feat. Bart!

Yvan eht nioj..

The Simpsons are my second family.

Hi, thank you very much.

P.S.: what's poss/posses ???

1 : a large group often with a common interest
2 : a body of persons summoned by a sheriff to assist in preserving the public peace usually in an emergency
3 : a group of people temporarily organized to make a search (as for a lost child)
4 : entourage 1

(www.webster.com)

I mean, Rails has problems guessing singular from plural here.

Yours sincerely,
Damian/Three-eyed Fish

Hi Damian, the correrct pluralization for hero is heroes.

Good luck,

-Conrad

Hi Damian, it seems that posse by definition is already plural. Also,
there isn't a word in the dictionary called 'posses'. This would be
considered a special case where both the singular and plural form is
the same, posse. Thus,

"posse".singularize

=> "posse"

Thus, I would the following to your environment.rb:

Inflector.inflections do |inflect|
  inflect.irregular 'posse', 'posse'
  inflect.irregular 'hero', 'heroes'
end

Good luck,

-Conrad

Thanks, I'll make it uncountable.

Checked Wiktionary — it says plural is "posses". Well, posse is a group, but why there couldn't be groups?