Ruby Quicktips Logo

Ruby Quicktips

Random Ruby and Rails tips.
This blog is dedicated to deliver short, interesting and practical tidbits of the Ruby language and Ruby on Rails framework. Read more...

Your submissions are more than welcome!
Sep 2 ’11

Sandbox your console hacking

When you start you Rails console, you can add the --sandbox parameter and all you modifications to the database will be rolled back again when you exit the console.

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

14 notes 0 comments

  1. rubynooby reblogged this from rubyquicktips and added:
    Great little tip!
  2. susatadahiro reblogged this from rubyquicktips
  3. thisjourney reblogged this from rubyquicktips and added:
    Awesome tip. Thanks
  4. rubyquicktips posted this

Comments

You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.

blog comments powered by Disqus