ruby on rails - Ancestry gem: return only last child in threads -
the ancestry gem has lot of methods navigate tree structure. can model.roots show root elements etc. how opposite? - return newest child each tree structure.
i thought adding column model (latest/boolean) , logic after save filters etc. feels bit clumsy. :/
best regards. asbjørn morell
maybe can hack class#inherited
hook, updating attribute of parent model on creation of new subclass:
Comments
Post a Comment