Forum: Ruby on Rails nested _sets_

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
88e98c5398a3b4af4d0eaefacf69f8b7?d=identicon&s=25 unknown (Guest)
on 2007-02-19 22:22
(Received via mailing list)
could someone help me with a few hints, how can I implement real
nested sets behaviour -- where I mean sets to be _sets_ i.e. with
unique members, unordered, so no tree like structure, no siblings etc.
are needed

It's seems too be too much for me.

Imagine accounts, where an account can have sub accounts and so on.
Then i'd like to query e.g. the sum transfered to an account or any
its children. Simple inserts (one parent, no siblngs), more complex

Like: sum(account.self_and_children.transfers).

I guess acts_as_tree is not what I'm looking for -- it has no method
for retieving all the children and is not very effective performance
wise as I read.

Acts_as_nested_set requires left-right columns, what is unnenecessary
in my case.

So could you give me an advice?

Thx a lot!
This topic is locked and can not be replied to.