我正在尝试在Rails 5.1中生成'Status'模型,当我运行
时rails generate model status
我得到了
The model name 's' was recognized as a plural, using the singular '' instead. Override with --force-plural or setup custom inflection rules for this noun before running the generator.
然后我在config / initializers / inflections.rb
中添加了一条新规则ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.irregular 'status', 'statuses'
end
再次运行命令,我仍然收到错误。
我错过了什么?
答案 0 :(得分:-3)
也许您可以将名称更改为州,因此复数是州