2017-06-04 24 views
0

我试图生成Rails的5.1“状态”模式,当我运行Rails的生成模型不使用拐点规则

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. 

我加入一个新的规则在配置/初始化/ inflections.rb

ActiveSupport::Inflector.inflections(:en) do |inflect| 
    inflect.irregular 'status', 'statuses' 
end 

再次运行命令,我仍然得到错误。

我错过了什么?

+0

这'generate'线工作,不需要任何拐点,还有别的东西造成这个错误。 – Iceman

回答

-3

也许你可以更改名称是国家的,所以多是美国