-
-
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
when position is null all new items get inserted in position 1 #41
Comments
You can use other boolean column. |
True. If you look at it from a semantic perspective, a list cannot have items w/o position. |
I see your point. But why is there a remove_from_list method? What would be a use-case for this method? |
I've added some code to pull #72 which fixes this issue. Now items which have been removed from the list and respond false to |
@nathany Done! |
I'm using 'remove_from_list' and a deleted_at attribute to remove items from list. The problem is that when creating a new record, if there are other records in the list with position of null, all new records get set to position 1. A workaround I've used is to set a default scope of :conditions => (:position ^ nil), but it seems to me at least, that the private method 'bottom_item' should have a default condition of position not nil.
The text was updated successfully, but these errors were encountered: