Even though, you’re using MongoMapper with Ruby and Rails, you may sometimes want to do queries using the Mongo database itself. Here’s how I do it (note: there may be a better way, please post a comment).

# Getting at the mongodb instance

# Listing its collections

# Get at any collection while within any model (note: returns a Mongo::Cursor)
coll = MongoMapper.database['questions'].find({})

# Convert that collection to an array (useful!)

# Display a collection (note: 'each' does an implicit 'to_a()')
MongoMapper.database['questions'].find({}).each {|x| puts x.inspect}

# In the Question model you can use this shortcut
# collection to get at the questions collection