A single Rails command can make lots of changes in an app - creating files and migrations, adding routes, etc. Undoing the damage of a mistake could be tricky for a beginner.
For example, say you generate some scaffolding, run the migration, and then realize your scaffolding command should have been singular (ruby script/generate scaffold cake type:string
) instead of plural (ruby script/generate scaffold cakes type:string
).
If you destroy the scaffolding before rolling back the database migration, you've created another problem.
So: what steps do you take to undo mistakes in Rails development?