1

Mongoid.default_session.database_names gives me an array of database names. I want to delete a specific database. How would I do that?

Mongoid.default_session.drop() always seems to drop the default database even if I override the current database using Mongoid.override_database("test_database")

What am I missing?

2 Answers 2

3

In Mongoid v2.0.2

Mongoid.purge!

Rdoc: Mongoid.purge!

Sign up to request clarification or add additional context in comments.

1 Comment

It does nothing in my case!
0

Have you tried a combination of Session.use and Session.drop?

Examples: http://mongoid.org/en/moped/docs/driver.html

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.