Thank you. The gem in question, mongoid-slug, also use a composite key made from two fields. I can not find any documentation on how to create composite keys in Mongoid 3.0. Please let me know if this is still supported.
This is a simple example on how composite keys are used in mongoid-slug:
class Animal
include Mongoid::Document
field :name
field :nickname
key :name, :nickname
end
Which I could change to the new syntax:
field :_id, type: String, default: ->{ default_field }
I was not aware of the 'key :field_1, :field_2' syntax before looking at this gem and
can not see anything about it in the documentation. Does the
'key :field_1, :field_2' syntax have an equivalent and supported analogue in
Mongoid 3.0?
Best,
Andy