Hi, sorry to bug you again, but I've run into a bit of a mindblank. With a nested set approach you can call self_and_decendants or descendants and get a result set that is ordered by the left column, thus ordered the way the user wants it. Is it possible to order by 'ancestry, position' and have a similar effect?
I'm trying to display the tree to the user :)
Have a look at the ordered_ancestry scope in the code and add a similar scope to your code, adding the position column.
Thanks Stefan, eventually I found that adding a default_scope to my model worked a treat. I also finally realised that 'subtree' is your name for 'self_and_descendants' lol so that all worked out. Subtree also seems to use the model's default ordering. I just ordered on 'ancestry is not null, ancestry, position'.