-
Notifications
You must be signed in to change notification settings - Fork 163
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
Make slug works fine with Mongoid::Paranoia #107
Comments
Sorry for the delay. I'll look into this issue shortly. |
This tricky issue just popped up for me as well. If you can point me in the right direction I can take a look. |
@jhoffner Thank you for offering to take a look at this problem. The only file that needs changes is: However, since Mongoid Paranoia is being moved out of Mongoid core in 4.0 the solution needs to work even if Mongoid Paranoia is not present. A solution might be to exclude documents that have the delete_at field set, since I believe Paranoid documents are marked using that field. Please let me know what you think. |
@jhoffner The only method that needs to be changed is 'for_slugs(..)' and I think it is reasonable that Mongoid Slug is changed to never return any deleted documents. |
According to simi/mongoid_paranoia#1 (comment), feel free to add test cases to test project. I made some basic specs and it works. |
@simi Sorry for not checking this better. I should have done a better job here. I can not at this point reproduce test-cases where Mongoid Slug fails with Mongoid Paranoia. @jhoffner @sadjow I've added the test cases from @simi to Mongoid Slug master. Could you please either
|
The slug query is fiding the deleted document when using with Mongoid::Paranoia
The text was updated successfully, but these errors were encountered: