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:

http://www.ruby-doc.org/core/classes/class.html#m000177


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -