-
Notifications
You must be signed in to change notification settings - Fork 164
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
Slugs do not initialize #177
Comments
That would be a great addition to the wiki. Maybe something could be based around the migration document? Especially the slow migration template. |
Yea, would be nice to have it generated initially for existing documents, was confused why it didn't work. |
agreed, at least for me . . . very grateful for this issue. |
@digitalplaywright I am looking into this issue and wrote a rake task that will set slug for existing records, to load this task into Rails we need to use |
@anuja-joshi You can add just task file and inform users to load that rake tasks file into their rake stack. |
… cases refs mongoid#177 RuboCop fixes updated README and removed class variable
… cases refs mongoid#177 RuboCop fixes updated README and removed class variable updated test cases
… cases refs mongoid#177 RuboCop fixes updated README and removed class variable updated test cases
A rake task was added in 8abb60d. |
When mongoid-slug is added to an existing application, the Model.slugs field is blank until every document is re-saved.
Suggestion: have a rake task or some default logic in mongoid-slug that will handle this initial case. Applications with large data sets that have business logic around "updated_at" may not want to re-save each instance to get the slug behavior.
Thanks!
The text was updated successfully, but these errors were encountered: