gobuffalo / buffalo

Rapid Web Development w/ Go
http://gobuffalo.io
MIT License
8.08k stars 578 forks source link

model name singular to plural is not correct #1440

Closed netqyq closed 5 years ago

netqyq commented 6 years ago

potato's plural should be potatoes.

# buffalo g resource potato title:string description:text --skip-templates
      create  actions/potatos.go
      create  actions/potatos_test.go
      create  locales/potatos.en-us.yaml
         run  buffalo db g model potato title:string description:text
v4.5.9

      create  models/potato.go
      create  models/potato_test.go
         run  goimports -w actions/actions_test.go actions/app.go actions/home.go actions/home_test.go actions/potatos.go actions/potatos_test.go actions/render.go actions/users.go grifts/db.go grifts/init.go main.go models/models.go models/models_test.go models/potato.go models/potato_test.go models/user.go models/user_test.go
      create  migrations/20180526135834_create_potatos.up.fizz
      create  migrations/20180526135834_create_potatos.down.fizz
         run  goimports -w actions/actions_test.go actions/app.go actions/home.go actions/home_test.go actions/potatos.go actions/potatos_test.go actions/render.go actions/users.go grifts/db.go grifts/init.go main.go models/models.go models/models_test.go models/potato.go models/potato_test.go models/user.go models/user_test.go
krehl commented 6 years ago

There was a somewhat similiar issue regarding automatic rewriting of names (the other way round). #113 Given these issues, I would propose to stop changing the plurality of entities (names).

stanislas-m commented 6 years ago

This is fixed on pop/soda side, but I still can see the problem with buffalo generated part. I'm moving the issue to buffalo repo.

markbates commented 5 years ago

This appears to be fixed now.