Act_as_tree with ordered items

Hello

I am using a data structure that resembles a tree with ordered items. I
know I can use :order in act_as_tree to sort the items at each level,
but since the items have no logical order I would have to use a table
column just to store this order. My experience with position indices of
this kind is that it can lead to inconsistencies in the database so I am
reluctant to use such a solution.

So my question is this: Is there a way (preferrably implemented similar
to acts_as_*) to specify data structure with links within a certain
level of the tree, maybe using equivalents of previousSibling and
nextSibling as references to other items in the same table, as well as a
parent reference?

Grateful for help, regards

Erik L.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs