The question is this, how do i display the acts_as_tree tree i have created? I have this:
<% puts TreeItem.root.children.find(:all)%>
also i tried: (using the display_children method from the agile book.
<% display_children(root).each do |child| %> <ul><li><%= child.name %></li></ul> <% end %>
the method:
def display_children(parent) puts parent.children.map { |child| child.name }.join(", ") end
what am i doing wrong?