ranked-model
ranked-model copied to clipboard
read row_order_position => nil
when i use an_object.row_order_position, i have nil but an_object.row_order return 4194304.
row_order_position isn't an accesor to have the position of the object ? how can I get it with ranked-model ?
actually, I use this :
AllObject.all.find_index(an_object)
an alternative is to do
AllObject.where("row_order < ?", an_object.row_order).count
I believe it's faster but I depends on if you have AllObject.all cached or not (if you use it somewhere else in the same request)
Good hints there :) Closing due to age.