From: Gene Tani Date: 2007-04-21T07:10:07+09:00 Subject: Re: looping through a tree from trunk to leaves On Apr 20, 11:45 am, Nanyang Zhan wrote: > I've just built a acts_as_tree model, > now I need to render it out as a tree structure in view. > and I also need a action method to loop through every row of the > database following the tree structure ( from root to it's branch, then > to the ends of the branch, then go back for other branches...). I think > both the view helper and action method need to use a similar loop style, > and this code may be popular, at lease useful. Is there any article > about this subject? > > I've get a view snip, btw:http://snippets.dzone.com/tag/acts_as_tree > > -- > Posted viahttp://www.ruby-forum.com/. google thru *rails-talk* for ajax tree control, widgets, etc, you'll see: http://ajaxonrails.wordpress.com/2006/11/26/ajaxonrailsdragdroptree/ http://www.epiphyte.ca/code/live_tree.html and lots more