我为Wta(女子网球协会)制作了一个模型,这就是发生的事情:
asarluhi@home:~/workspace/tennis_project $ rails generate model Wta ranking:integer name:string points:integer
Running via Spring preloader in process 8875
[WARNING] The model name 'Wta' was recognized as a plural, using the singular 'Wtum' instead. Override with --force-plural or setup custom inflection rules for this noun before running the generator.
invoke active_record
create db/migrate/20161217102926_create_wta.rb
create app/models/wtum.rb
invoke test_unit
create test/models/wtum_test.rb
create test/fixtures/wta.yml
因此,在没有提示我选择的情况下,rails解决了将Wta
单一化为Wtum
的问题:这太可怕了!
我现在还有哪些选择:更改所有这些文件和内部代码或手动删除它们并使用选项--force-plural
重新生成模型?