Open trekinbami opened 6 years ago
Did you try dot notation? If not that could be added I guess.
On Dec 21, 2017 11:05 PM, "trekinbami" notifications@github.com wrote:
Hi,
`const CourseSchema = new Schema({ title: { type: String, required: true }, videos: [VideoSchema], });
CourseSchema.plugin(URLSlugs('title');`
This is pretty obvious. But now I want to run the plugin for the VideoSchema, because the videos also have title that needs to be slug-i-fied (don't know if that's a word).
Is this possible?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/talha-asad/mongoose-url-slugs/issues/41, or mute the thread https://github.com/notifications/unsubscribe-auth/AC1zVr8xs_F5xLcq2a9BZQ5qBOQQHDM3ks5tCp3UgaJpZM4RKKlh .
I tried
CourseSchema.plugin(URLSlugs('videos.title', { path: 'videos.slug' }));
But didn't seem to do anything, unfortunately.
Is there any update on this? I'm facing the same issue. If not, is it possible to generate slugs manually in the same way as they are created automatically using the packages API?
Hi,
This is pretty obvious. This is the model for a course.
But now I want to run the plugin for the VideoSchema (which doesn't have a Model), because the videos also have title that needs to be slug-i-fied (don't know if that's a word).
Is this possible?