Module: Mongoid::Uuid::Uuid::ClassMethods

Defined in:
lib/mongoid/uuid/uuid.rb

Instance Method Summary collapse

Instance Method Details

#uuid_options(*fields) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/mongoid/uuid/uuid.rb', line 16

def uuid_options(*fields)
  options = fields.extract_options!

  if options[:background_index]
    index_spec = index_specification(uuid: 1)
    index_spec.options[:background] = true
  end
end