Closed smoyte closed 7 years ago
Oh, FYI, simply using deleted_at as a regular scope param doesn't work because on destroy, deleted_at gets set first before AAL tries to do its rank adjustments.
Hi @hooverlunch, thank you for your contribution! :)
In the past I've done things like this for complex scopes: https://github.com/swanandp/acts_as_list/issues/158#issuecomment-211116767
Though this solution looks good too. @swanandp, what do you think? I'm happy to merge it as it's quite useful and I don't think it breaks any of the current API.
Thanks @swanandp. Released as 0.9.9. Great work!
Yay! Thanks you all for the prompt response!
Great friggin' work, @hooverlunch! Really cleans up complex scopes. 👍
Hi there. Thanks for all the awesome work on this classic gem.
I'm suggesting the ability to include fixed values in the scope array so that I can ignore soft deleted items (via acts_as_paranoid).
Someone had suggested using a string scope for this but I was encountering a bug with that when moving an object from one scope to another -- it wasn't resetting the position to 1, even though it is able to do that correctly with the identical scope but in array format.
Debugging that was going to be tough so I went for this instead, since it's nicer/more readable syntax anyway IMO. If you want me to file an issue for the bug I can do that also.
Hope you like this!