If you are new to Rails, you may not know that a simple option when using the rails console is all it takes to avoid permanent database changes while you are learning or testing a bit of your app.
In terminal (or Command on Windows) you would normally write:
|
1 |
rails console |
To enable sandbox mode (which rolls back any database changes when you exit) simply write this:
|
1 |
rails console --sandbox |
It is all in the the command line switches. And all in the wrist. Happy consoling!