digitalplaywright/mongoid-slug — pull request #155 by klacointe (2014-02-19 17:11:04+00:00)
Title: Add sparse option to slug index.

Without this option, db:mongoid:create_indexes fails because of multiple null values when user don't already have slugs.

```
rake aborted!
The operation: #1, :w=>1}
@fields=nil>
failed with error 11000: "E11000 duplicate key error index: project_development.users.$_slugs_1 dup key: { : null }"

See https://github.com/mongodb/mongo/blob/master/docs/errors.md
```

http://docs.mongodb.org/manual/core/index-unique/