Closed sailerinteractive closed 3 years ago
Hi @sailerinteractive, that should work fine, but it will rebalance almost immediately if you resort the items as there will be a collision. One thing to be aware of is two items having the same position value as that can easily happen with acts_as_list
due to overlapping requests. Might be better to either verify that isn't the case, or migrate across by manually saving each item in the list in order with the position set to last (which is the default anyway from memory).
Hope that helps :D
Hi!
i'm about to migrate a project from acts_as_list to ranked_model and i'm trying to reuse the existing position integer column. I did some tests and it seems that this works really well without any additional migrations since the column values are automatically spaced out when the first position changes happen. Do i overlook something here or is it really that simple? If it works simply like that it might be worth mentioning that in the docs.
Florian