views:

1968

answers:

4

Is their anyway to 'undo' the effects of a scaffold command in rails?

+26  A: 

You usually do scaffolding using


 ./script/generate scaffold SomeName

similarly

you can destroy/undo it using ( it probably will delete all the files created by "generate")


 ./script/destroy scaffold SomeName

HTH

Rishav Rastogi
Awesome! Thanks.
Daniel
A: 

If you just want to see the files a generator will create you can pass the generator --pretend or -p option.

Sudhanshu Arya
+3  A: 

Rishav Rastogi is right, and with the new rails its:

rails generate scaffold STUFF

rails destroy scaffold STUFF

Misha Rabinovich
A: 

Thanks a lot, I had the same question and u guys answered it!

Mendi