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



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

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