未验证 提交 60c953c9 编写于 作者: V Vipul A M 提交者: GitHub

Merge pull request #35514 from soartec-lab/learn_more_about_inflections

Learn more about inflections[ci skip]
......@@ -1341,7 +1341,7 @@ The method `pluralize` returns the plural of its receiver:
"equipment".pluralize # => "equipment"
```
As the previous example shows, Active Support knows some irregular plurals and uncountable nouns. Built-in rules can be extended in `config/initializers/inflections.rb`. That file is generated by the `rails` command and has instructions in comments.
As the previous example shows, Active Support knows some irregular plurals and uncountable nouns. Built-in rules can be extended in `config/initializers/inflections.rb`. This file is generated by default, by the `rails new` command and has instructions in comments.
`pluralize` can also take an optional `count` parameter. If `count == 1` the singular form will be returned. For any other value of `count` the plural form will be returned:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册