I use this often myself, especially for running "FactoryGirl.lint" after some complex factory build-out.
But one gotcha to be aware of: because this runs your entire (potentially long-running) console session *in an open database transaction*, you open yourself up to locking/deadlocks issues if you update some data in the --sandbox console, while at the same time are running tests that may be touching that data. I've gotten bitten by this more than once. So it's best if you use this to do something specific, exit out of there (thus rolling back the transaction), and continue about your testing. On Fri, Dec 19, 2014 at 9:58 AM, Chris McCann <[email protected]> wrote: > This has been out for several months but I just stumbled across it > yesterday: > > http://pragmaticstudio.com/blog/2014/3/11/console-shortcuts-tips-tricks > > My favorite: > > $ rails console --sandbox > Loading development environment in sandbox > Any modifications you make will be rolled back on exit > >> > > -- > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby > --- > You received this message because you are subscribed to the Google Groups > "SD Ruby" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby --- You received this message because you are subscribed to the Google Groups "SD Ruby" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
