rails/rails — pull request #7071 by davidcelis (2012-07-16 21:47:06+00:00)
Title: Move ActiveSupport inflections to the initializer template

This is a patch meant for 4.0 that will move most inflections that are
currently defined in `activesupport/lib/active_support/inflections.rb`
to the inflection initializer template defined in Railties.

Inflections are currently "frozen" in Rails. Commits that add/remove/alter
inflections are largely ignored whether or not they make sense when
considering English grammar. The freezing was a decision made to avoid
breaking existing apps that depend on these defined inflections. By moving the
inflections to an initializer, we can unfreeze this area of Rails and change
inflections without fear of breaking existing applications.

Additionally, this will garner more understanding as to how Rails
pluralization/singularization works. For oddities that occur in the
inflections Rails has defined, it's often simply a "WTF?" moment and
people have to source dive in order to figure out why their
singularization/pluralization is not working as expected. Laying them
all out in the initializer will reduce a lot of headache associated with
inflection oddities.

Two things to note:

1. I've left the two basic inflections within ActiveSupport. These are:
* Add an "s" to make a word plural (unless it already has one)
* Remove an s to make a word singular (unless it ends in two)

I'm not actually sure about whether that second one should be
included, or even if I should move both to the initializer as well.
I'd appreciate some input on that.

2. I have another pull request open (pull request #6820) that would need
to be modified if this is merged.

Signed-off-by: David Celis