-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
How to exclude objects to be positioned? #125
Comments
The following should work; can you try and let me know? acts_as_list scope: 'category = #{category_id} AND published = 0' |
I had to change
But the methods don't seem to work properly anymore. E.g. Is there anything additionally I should think about to achieve the "normal" behaviour of acts_as_list but on a restricted set of items? |
Work is in progress to support lambdas as scopes, but for now if |
Thank you! |
Six years later, and I ask myself the same thing all over again. But this time around I feel more comfortable looking for the answer in the source code :) This works great:
|
Haha! Great to see that feature worked for you :) It's certainly been much easier for me since learning to dive into gems and figure things out for myself. If you think this can be better documented, feel free to do a PR for documentation improvement :) |
I have a Rails app where a Category has many Post.
scope: :category
in the Post class is automatically giving position to posts withing the same category.How could I exclude posts that has the attribute
published
set tofalse
to be part of the positioning?The text was updated successfully, but these errors were encountered: