First, if you have already run the migrations generated by the scaffold
command, you have to perform a rollback first.
rake db:rollback
You can create scaffolding using:
rails generate scaffold MyFoo
(or similar), and you can destroy/undo it using
rails destroy scaffold MyFoo
That will delete all the files created by generate
, but not any additional changes you may have made manually.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…