sortable
sortable copied to clipboard
Suggestion: transactional moves
First off all, thanks for this gem (much better than acts_as_list imo)!
This may not be a frequently occurring use case, but things went wrong in my code when the validation for a record to be moved didn't pass, which is based on the position of the record. The consequence was that all other records were moved down and the record itself got position nil (it is removed form the list => record valid, reinsertion fails). Therefore, the moving algorithm should be atomic.