When I one to add one column into a model, I use command like this: script/generate migration AddRoleToUser role:string
This will generate the migration, give it an appropriated name....Does Rails support a similar script to rename the entire model (and its corresponding view, controller if possible)? Some thing like this:
script/generate migration RenameAccountToUser
Thank you, Lam
There is something called rename_table that you can use in your migration to rename you tables, but then you will have to change the name of the models yourself. You can do this automatically by making dummy versions of your model inside the migration itself, but that would be complex. I wonder if there is an automated script lying in the wild that would do this automatically for you.