I have a model & a table which I no longer need in my App, I could leave them there but I would like to remove them to keep things tidy.
I\'m trying to figure out
I know this is an old thread. More often than not, you want to remove not only the model, but routes, controller and views associated with that model as well. To do that, run these
rails g migration DropYourModel
rails destroy scaffold YourModelName
Edit your migration file to drop_table
and then run
rake db:migrate
If the model happens to be defined in a namespace, e.g., admins
, replace the first command with
rails destroy scaffold admins/YourModelName