Improved rails ActsAsList plugin

назад до списку постів

There is no ability to move list item across several other in standard rails acts_as_list library.

I tried quick and dirty solution of moving item n-times up or down, something like

3.times do
   third_item.move_lower
end

But instead of getting third item to position 6 i had third item on 4-th position (probably some bug).
There is solution that works, it is here http://github.com/html/acts_as_list. I've just added ability to move item across n-positions and above code now can be replaced with

third_item.move_lower(3)

and it works like expected :).