Module: MongoMapper::Plugins::Indexes::ClassMethods

Defined in:
lib/mongo_mapper/plugins/indexes.rb

Instance Method Summary collapse

Instance Method Details

#ensure_index(spec, options = {}) ⇒ Object



5
6
7
# File 'lib/mongo_mapper/plugins/indexes.rb', line 5

def ensure_index(spec, options={})
  collection.create_index(spec, options)
end