标签: ruby-on-rails activerecord ancestry
我有一个节点,我感兴趣的后代。但我感兴趣的是在特定深度找到的后代。我怎么做?
答案 0 :(得分:0)
https://github.com/stefankroes/ancestry#selecting-nodes-by-depth
Use the at_depth(n) n being the depth of the nodes that you want to return Note: the depth begins with value 0```