s.ross - Seems like this is overly-complicated since it utilizes >
root > children > children's children etc...
When in my case, it's either:
#1: root > child > child's child > child's child's child (Each
initial post is a root, and each reply (child) is a reply to the last
child
or
#2: root > children (Each initial post is the root, and the replies
with be the timestamped children)
If I go with #2, then at most I have two layers - Roots (Each initial
post in the forum) and many direct children of each root (the
timestamped--which will give me the order--replies).
The overhead seems high with acts_as_nested_set....
If you were modeling this (your scenario 1), you might use a linked
list or doubly linked list. Right? Would acts_as_list work? That
would preserve order and of course the scope of the list would be the
thread id or something sensible like that.
Your scenario 2 is something of a bag. No real positional
relationship implied, you handle the ordering based on the data.
Perhaps acts_as_tree is not what you were looking for. The only
reason I suggested aans is because if has proven effective for me at
partitioning threaded topical discussions where there is not a strict
linear descendency. For example:
- (Poster 1) when is rails 2.0 gonna be released
- (Poster 2) re: when is rails 2.0 gonna be released
- (Poster 1) re: when is rails 2.0 gonna be released
- (Poster 3) re: when is rails 2.0 gonna be released
This is more the slashdot model and requires a bit more tracking of
who replied to whom within a thread.