Rails: Plural of "human" is not "humen"

Created on 19 Nov 2014  ·  3Comments  ·  Source: rails/rails

I apologize if this is not the right place to submit this. The correct plural of "human" is of course "humans".

$ bundle exec rails console
Loading development environment (Rails 4.1.5)

Frame number: 0/6
[1] pry(main)> 'human'.pluralize
=> "humen"

Most helpful comment

Unfortunately, the inflector is frozen. We don't accept patches that solve this. You can fix this in your own app by adding this to your config/initializers/inflections.rb

ActiveSupport::Inflector.inflections do |inflect|
  inflect.irregular 'human', 'humans'
end

All 3 comments

Unfortunately, the inflector is frozen. We don't accept patches that solve this. You can fix this in your own app by adding this to your config/initializers/inflections.rb

ActiveSupport::Inflector.inflections do |inflect|
  inflect.irregular 'human', 'humans'
end

Thanks for the prompt reply @sgrif. I should have RTFM:

The Rails core team has stated patches for the inflections library will not be accepted in order to avoid breaking legacy applications which may be relying on errant inflections. If you discover an incorrect inflection and require it for your application or wish to define rules for languages other than English, please correct or add them yourself (explained below).

http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html

No problem, we got a kick out of the title of the issue. ;)

Was this page helpful?
0 / 5 - 0 ratings