Mongo Mapper

A Mongo ORM for Ruby

Built from the ground up to be simple and extendable, MongoMapper is a lovely way to model your applications and persist your data in MongoDB. It has all the bells and whistles you need to get the job done and have fun along the way.

Getting Started

Install the MongoMapper gem:

$ gem install mongo_mapper

Define your models:

class User
  include MongoMapper::Document

  key :name, String
  key :age,  Integer

  many :hobbies

class Hobby
  include MongoMapper::EmbeddedDocument

  key :name,    String
  key :started, Time

Use your models to create and find documents:

user = => 'Brandon') => 'Programming',
  :started => 10.years.ago)!

User.where(:name => 'Brandon').first

Check out the Documentation

Who’s Using MongoMapper?

Fork me on GitHub