Added fixed values option for scope array #286
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!