Closed RamyRais closed 8 years ago
Would just saving each document work?
Flower.findById(id, function (err, flower) {
if (err) return handleError(err);
flower.save(function (err) {
if (err) return handleError(err);
// Done, you should now have a slug
});
});
I was using update and it seems with update it does not work but with save it work. Thank you.
Hello, I have already some document in the database and i am migrating ti use slug how can i update all my document so they have slug field?
I was looking for a function generate the slug something like URLSlugs.generate(text, options) and looping through all the document and generate it.