brendon / acts_as_list

An ActiveRecord plugin for managing lists.
http://brendon.github.io/acts_as_list/
MIT License
2.04k stars 355 forks source link

Fix unique index constraint failure on item destroy #313

Closed yjukaku closed 6 years ago

yjukaku commented 6 years ago

Continuing on the work from #246, but this time applying the idea to the destroy callbacks.

With this fix, destroying an item in a list that has a unique DB constraint on the position column should not raise a DB error, as long as the sequential_updates option is enabled.

Fixes #267

brendon commented 6 years ago

Looks good to me! Thanks @yjukaku :D

brendon commented 6 years ago

Released as 0.9.13