What is the Ruby on Rails' sandbox console
A brief overview of the rails console --sandbox command and how to use it.
What is the Ruby on Rails' sandbox console
I started learning Ruby on Rails again.
While going through the Odin Project’s Ruby on Rails course, I came across the rails console --sandbox
command and decided to explore it further. Interesting that I haven’t seen it earlier.
What does it do?
It acts as a normal console, but doesn’t persist the changes you have made, which makes it useful for testing stuff out. I will try it out.
Use it only for development, because rolling back the db transactions does not ensure you’ll end up in the initial system state
This post is licensed under CC BY-NC 4.0 by the author.