-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to use the plugin on a subdocument? #41
Comments
Did you try dot notation? If not that could be added I guess.
…On Dec 21, 2017 11:05 PM, "trekinbami" ***@***.***> 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
<#41>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AC1zVr8xs_F5xLcq2a9BZQ5qBOQQHDM3ks5tCp3UgaJpZM4RKKlh>
.
|
I tried
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? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
The text was updated successfully, but these errors were encountered: