Permalink
Browse files

recommended by MongoHQ to drop all collections and reset a database

  • Loading branch information...
1 parent 6c3410a commit 9ebba7eb9332dc11812e79afe5ea4a9b351eda8b @fortuity committed Feb 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 db/seeds.rb
View
@@ -6,7 +6,7 @@
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Mayor.create(:name => 'Daley', :city => cities.first)
puts 'EMPTY THE MONGODB DATABASE'
-Mongoid.master.collections.reject { |c| c.name =~ /^system./}.each(&:drop)
+Mongoid.master.collections.reject { |c| c.name =~ /^system/}.each(&:drop)
puts 'SETTING UP DEFAULT USER LOGIN'
user = User.create! :name => 'First User', :email => 'user@test.com', :password => 'please', :password_confirmation => 'please'
puts 'New user created: ' << user.name

0 comments on commit 9ebba7e

Please sign in to comment.