Currently, apply_inflections does not take into account that the input might be a multi-word string separated by underscore. (tableize etc relies on this behavior to work correctly.) This bug affects only uncountable multi-word strings separated by underscores:
"funky jeans".singularize # => "funky jeans"
"client information".pluralize # => "client information"
"funky_jeans".singularize # => "funky_jean"
"client_information".pluralize # => "client_informations"
It's also worth pointing out that "funky_jeans".singularize used to work correctly before 9b4622a, which was merged almost 2 years ago so this is essentially broken since Rails 3.
On the other hand, it appears that "client_information".pluralize has always been broken, so this does change the behavior of tableize and could potentially break some older apps out there.
Currently, the inflector is not set up correctly to handle phrases
(multi-word strings) as input. This ocasionally works right now, but it
is more or less a coincidence. Since Rails internally depend on this
singularize/pluraize being able to handle phrases (see tableize), this
commit fixes the bug and correctly handle phrases in singularize and
pluralize. The following should work as expected after this patch:
'MyClass'.pluralize # => 'MyClasses'
'some-slug'.pluralize # => 'some-slugs'
'saw_fish'.pluralize # => 'saw_fish'
'optical mouse'.pluralize # => 'optical mice'
'funky jeans'.singularize # => 'funky jeans'
See #7134 for discussions.