ActiveSupport的英语复数规则在哪里定义?

我找到了ActiveSupport的inflector类。在哪里可以找到初始化英语变形器的代码?     
已邀请:
英语规则在ActiveSupport中(特别是在lib / active_support / inflections.rb中)。     
ActiveSupport inflector.rb文件包含所有变形库和模块。 如果你想自定义它,你的Rails
config/initializers
路径中有一个名为
inflections.rb
的文件。 默认情况下它包含
# Be sure to restart your server when you modify this file.

# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
#   inflect.plural /^(ox)$/i, '1en'
#   inflect.singular /^(ox)en/i, '1'
#   inflect.irregular 'person', 'people'
#   inflect.uncountable %w( fish sheep )
# end
您可以对其进行编辑以自定义
Inflector
行为。     

要回复问题请先登录注册