forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 rails#7134 for discussions.
- Loading branch information
1 parent
fba8a6a
commit ca856d6
Showing
3 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters