0

I generated a model for Wta (women tennis association) and this is what happened:

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

So rails, without prompting me with a choice, solved what it perceived as an issue singularizing Wta into Wtum: that's horrible!
What choices am I now left with: changing all those files and inside code or deleting them by hand and re-generate the model with option --force-plural?

Asarluhi
  • 1,280
  • 3
  • 22
  • 43
  • 1
    http://stackoverflow.com/questions/3517989/ruby-on-rails-how-do-you-explicitly-define-plural-names-and-singular-names-in-r – Eyeslandic Dec 17 '16 at 11:08
  • That solves the second part of my issue. To revert the model generation I used 'rails destroy model Wtum' as explained in http://stackoverflow.com/questions/4161357/how-do-i-reverse-a-rails-generate – Asarluhi Dec 17 '16 at 11:35
  • 2
    Why don't you call it WtaRank? Seems a bit more Rails like to me as well. – bo-oz Dec 17 '16 at 11:50

0 Answers0