The ancestry gem has a lot of methods to navigate the tree structure. You can do Model.roots to show all root elements etc. How do opposite? - return newest child for each tree structure.
I thought about adding an extra column to my model (latest/boolean) and then do some logic with after save filters etc. However this feels a bit clumsy. :/
Best regards. Asbjørn Morell