Sha256: 9f252508eb8e53b9ffe78031f5c48c33bb7f268ae198353c033523a547085136

Contents?: true

Size: 267 Bytes

Versions: 4

Compression:

Stored size: 267 Bytes

Contents

# encoding: UTF-8
module MongoMapper
  module Plugins
    module Indexes
      extend ActiveSupport::Concern

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongo_mapper-0.10.0 lib/mongo_mapper/plugins/indexes.rb
mongo_mapper-0.9.2 lib/mongo_mapper/plugins/indexes.rb
mongo_mapper-0.9.1 lib/mongo_mapper/plugins/indexes.rb
mongo_mapper-0.9.0 lib/mongo_mapper/plugins/indexes.rb