8dpdzg
Last Updated: February 25, 2016
·
500
· rbmrclo
2fe1468f365b2c131b38e87aa4acb601

Hack safely from your rails console

Sometimes, you want to test out some code on production without affecting the database. You can add the --sandbox parameter and all your modifications to the database will be rolled back when you exit the console.

rails console --sandbox  # Rails 3 || 4
script/console --sandbox # Rails 2

Source: http://guides.rubyonrails.org/command_line.html#rails-console

Say Thanks
Respond