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
Written by Robbie Marcelo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#