Generate a controller with all the RESTful functions

前端 未结 10 1467
遇见更好的自我
遇见更好的自我 2021-01-30 07:58

I am trying to generate a controller with all the RESTful actions stubbed. I had read at Wikibooks - Ruby on Rails that all I needed to do was to call the generator with the co

10条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-30 08:33

    There's no way (that I know of? that is documented?) to stub out a controller except through scaffolding. But you could do:

    script/generate controller WhateverController new create edit update destroy show
    

提交回复
热议问题