Questions tagged [mongoid-slug]

Generates a URL slug/permalink based on fields in a Mongoid-based model

Mongoid Slug generates a URL slug or permalink based on one or more fields in a Mongoid model. It sits idly on top of stringex, supporting non-Latin characters.

Homepage

4 questions
2
votes
2 answers

How to sluggify legacy data with Mongoid::Slug

I am using Mongoid::Slug https://github.com/digitalplaywright/mongoid-slug. I am trying to update a set of data, which in part has been created prior to the usage os Mongoid::Slug. So I have a bunch of objects with _slugs = [] and slug.nil?. I want…
Jan
  • 6,532
  • 9
  • 37
  • 48
1
vote
1 answer

How to Create the Unique Slug for each Comment Mentioned in MongoDB Official Doc in Nodejs?

I am looking at this article as I want to create a Comments System with Nodejs and MongoDB: https://docs.mongodb.org/ecosystem/use-cases/storing-comments/ There are 3 methods to implement a comments system as it mentioned in this article, and the…
Luke
  • 93
  • 1
  • 6
0
votes
1 answer

Mongoid Slug Localize migration

What's the best way to go about migrating Mongoid Slugs to localised versions. Missed adding localise: true on the slug field and now need to migrate my documents to have localised slugs. eg: currently I have _slugs:["my-slug"], when what I would…
Grant Trevor
  • 1,052
  • 9
  • 23
0
votes
1 answer

uninitialized constant Mongoid::Slug - can't get mongoid-slug to work

Receiving uninitialized constant Mongoid::Slug when trying to load a view. The troubled Model is: class Course include Mongoid::Document include Mongoid::Timestamps include Mongoid::Slug field :title, type: String slug :title validates…
Grant Trevor
  • 1,052
  • 9
  • 23