removing a scaffold

Hi Alex, I was looking up how to remove a scaffold and it seems that I need to do: rails destroy scaffold Listing if i did: rails generate scaffold Listing however, if i've done: rails generate scaffold Listing name:string description:string price:integer do i need to to: rails destroy scaffold Listing name:string description:string price:integer or can i just do rails destroy scaffold Listing? (because there are quite a lot of additional fields i've added) Thanks!

Posted over 5 years ago by Harry Lee
Posted over 5 years ago by Alex Yang

You shouldn't need to include all the fields and data types when running 'rails destroy scaffold Listing'. However, make sure you rollback any migrations you may have already run before running this command. For example, if the migration was the most recent one, you'll need to run 'rake db:rollback' and then 'rails destroy scaffold Listing'.

0