Ruby on Rails - Awesome nested set plugin
问题 Is there a simple way to display the entire nested set when using this plugin? What I would like to do is display an unordered list of root nodes with another unordered list inside each child that also contains children and so on? Any advice appreciated. Thanks. 回答1: There are a few ways to do this. The simplest is to just start with the roots and parse each node and it's children. The first thing I'd do is make a partial for a the node markup: _your_model.html.erb <li> <%= your_model.name %>