Closed mikeni closed 8 years ago
Hello
It can be implemented for trees, but that's not what library has been built for. The idea is that you can select arbitrary hierarchical data in a single query and receive flat result set.
If you want to build nested hash using that result set, than you somehow need to know which node is "parent" and which is "child", and I find a bit hard to find out for general case.
But you can quite easily implement this feature yourself using this code as an ispiration: https://github.com/take-five/acts_as_ordered_tree/blob/master/lib/acts_as_ordered_tree/iterators/arranger.rb
Thank you for the gem and the reply.
is there anyway to convert results into nested hashes representing a tree of results?