Generate a controller with all the RESTful functions

前端 未结 10 1574
遇见更好的自我
遇见更好的自我 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:41

    EDIT(due to some comments) : Original question was in 2010 - hence the answer is NOT for RAILS 4 , but for rails 2!!

    try using scaffolding.

    script/generate scaffold controller Properties
    

    Section of Official docs on Ruby On Rails

    I'm sure you can find more info if you do a google search on rails scaffolding. Hope that helps.

    EDIT: For RAILS 4

    rails g scaffold_controller Property

提交回复
热议问题