DEV Community

Discussion on: The Useful & Hidden '_' Command In IRB

Collapse
 
sijiadavis profile image
CeliaD

another thing I find useful when working with Rails console is the sandbox mode rails console --sandbox. When starting the Rails console in sandbox mode, the entire session will be wrapped in a transaction, and gets rolled back when you exit the console. This is nice when we want to mutate some records for testing purpose and not mess up our development/production data.

Collapse
 
edwinthinks profile image
Edwin Mak

Ahh nice! I didn't know you could do that!