views:

323

answers:

1

In the desktop world, it would be a treeviewcontrol.nodes = @nodes

However I'm doing a prototype using rails and I have the hierarchy loaded as a bunch of nested MyNode objects. My intent is to display this as a tree, the user can expand or collapse nodes as needed.

I didn't find a pure Rails solution - seems like the idea is to use AJAX, some javascript and css to render a tree-view. I tried looking at YUI - I haven't given it enough time, but it seems to be a huge bucket and the examples don't tie in to ruby. An example that I found appeared dated.

So I'm looking for a treeview control that is quick to plug-in to my Rails app.. any suggestions (hopefully based on actual usage exp)?

+1  A: 

Just for the next person who comes down this road...
Found a JQuery tree plugin that is available but under development. Was a breeze to use. In case you'd like to read the details..
http://madcoderspeak.blogspot.com/2009/07/how-to-show-tree-treeview-in-rails-view.html

Gishu