Is there an option to generate scaffolding without generating migrations?

后端 未结 1 1168
独厮守ぢ
独厮守ぢ 2021-02-05 10:54

One of the things that bothers me in Rails is that scaffolding generates migrations that I don\'t always need.

Is there a way to generate the scaffold without the corre

1条回答
  •  醉酒成梦
    2021-02-05 11:43

    Use the --skip-migration parameter. For example:

    rails generate scaffold post title:string body:text --skip-migration 
    

    0 讨论(0)
提交回复
热议问题