acts_as_list
acts_as_list copied to clipboard
Added Functionality for Repairing Duplicate Positions in List
closes #333
@brendon I am still working on this PR but I put it here so that you can have a look and let me know if this is what you had in mind.
I still need to write the functions and checks for gaps in the list, improve tests and write documentation.
I might also add a protection to impede the function from getting stuck in the while look... Just not sure if it makes sense...
I'm still interested in adding this. Also see https://github.com/swanandp/acts_as_list/pull/284/files which I've closed but had a test for detecting corrupted lists. Perhaps we could add an auto-correct option (off by default)?
@pacarvalho Is this still on your radar?
@oyeanuj I am interested in seeing this completed. Just need to know what needs to be changed/added. It has been a while since I started this so I don't quite remember where we left off :/
Are you interested in collaborating?
I'm happy to review what you guys come up with. I think the overarching goal of any auto-correction would be for it to be completely transparent to the user (and with no side effects). Since it'll likely happen at the time a change is being made to the list, this could get messy as if positions of items change from what the user was expecting, their intentions could become invalid.
I might have the wrong end of the stick however, it's been a long time since I looked at this :D
@brendon @pacarvalho Thanks for the quick responses! I honestly don't understand the code enough (or for that matter Rails), to be able to come up with a sufficiently competent PR. Mostly, I was curious if I should be expecting this PR to this library or not :)