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

Move item X after item Y #256

Closed jmuheim closed 7 years ago

jmuheim commented 7 years ago

Another maybe stupid question which I just seem not to be able to find in the docs:

is there a way to specify that I want to move an element X after element Y? So I don't have to specify the exact position?

brendon commented 7 years ago

The only way is to use the reference items position to set the new items position using insert_at. The reference item will be pushed out of the way.