Please sign in to comment.
Correctly handle phrases in singularize/pluralize.
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.
- Loading branch information...
Showing with 32 additions and 4 deletions.