Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

when position is null all new items get inserted in position 1 #17

Open
cdcdcd123 opened this issue Jun 29, 2012 · 1 comment
Open

when position is null all new items get inserted in position 1 #17

cdcdcd123 opened this issue Jun 29, 2012 · 1 comment

Comments

@cdcdcd123
Copy link

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.

@amerine
Copy link

amerine commented Jun 30, 2012

@cdcdcd123 Can you please open this issue over at https://github.com/swanandp/acts_as_list ? That is the new home for this library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants