A few months ago, I wrote this post demonstrating how to default the Rails console into sandbox mode. This is a pretty nice feature for production console access, but it becomes obscenely annoying as soon as you encounter this issue; now, every time you fat-finger a query, you're pretty much forced to exit and restart the console.

If you use pry-rails, there is a pretty simple solution for this, namely a custom exception handler. If you don't already have one set up, create a .pryrc file and add this snippet to it: