Saturday, 14 July 2012

How to run all migration once again

I am in middle of some migration version and I want to revert all and run from starting. I have done this by below commands

=> rake db:migrate version=0
=> rake db:migrate

Rails: How to revert created scaffold files

I have created user scaffold and due to some reason i want to delete all files which are created by scaffold.

to generate scaffold i Used this command

=> rails generate scaffold User name:string password:string

Two revert that files created by above command i run this command.

=> rails destroy scaffold User name:string password:string