closure_tree icon indicating copy to clipboard operation
closure_tree copied to clipboard

Flat version of hash tree

Open Un3qual opened this issue 7 years ago • 3 comments

Is there a way to get a flat version of a hash tree. It doesn't have to be a hash tree, but just be ordered in the same way, and be flat.

Un3qual avatar May 15 '17 00:05 Un3qual

besides selfAndDescendants?

mceachen avatar May 15 '17 00:05 mceachen

Yeah. I could use that but my model is Comments and a Post has_many Comments, so i would have to have 1 level of nesting On Sun, May 14, 2017 at 5:36 PM Matthew McEachen [email protected] wrote:

besides selfAndDescendants?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mceachen/closure_tree/issues/270#issuecomment-301351266, or mute the thread https://github.com/notifications/unsubscribe-auth/AF1W05Qd2OKYgnjHcVqbJTWkIfIQ3GUpks5r553-gaJpZM4Najhg .

Un3qual avatar May 15 '17 01:05 Un3qual

Also, self_and_descendants is ordered by depth, so the order is wrong.

Un3qual avatar May 15 '17 05:05 Un3qual