This project is archived and is in readonly mode.

#549 ✓stale
Prem Sichanugrist (sikachu)

Fix inflector bug on pluralize the irregular words

Reported by Prem Sichanugrist (sikachu) | July 4th, 2008 @ 08:52 AM | in 2.x

There's one problem that I count it as a bug, but I don't know it should be counted as a bug or not.

Normally, when you use inflector 'pluralize' and 'singularize' methods, it would look something like this:

puts "bag".pluralize
#=> "bags"
puts "bags".singularize
#=> "bag"

Now when it comes to pluralize the plural, it returns the same word again:

puts "bags".pluralize
#=> "bags"

However, for the irregular word (i.e. person and people), when using the pluralize on the plural form, it gives a strange result:

puts "person".pluralize
#=> "people"
puts "people".singularize
#=> "person"
puts "people".pluralize
#=> "peoples"

I don't think this is an expected behavior, since you would normally not putting 's' after the plural form of the word. :)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages