Skip to content

Instantly share code, notes, and snippets.

@jakcharlton
Created October 10, 2010 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakcharlton/618872 to your computer and use it in GitHub Desktop.
Save jakcharlton/618872 to your computer and use it in GitHub Desktop.
puts 'Empty the MongoDB database, exclude System stuff'
Mongoid.master.collections.select do |collection|
include = collection.name !~ /system/
puts 'Dropping ' + collection.name if include
include
end.each(&:drop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment