Hi,
I'm trying to implement a very simple acts_as_tree search in my index html.
I am able to show the parents, with no issue, but the children will not show.
I have something like this for the parent, which displays fine:
<% for group in Group.roots %> <td> <tr> <a href="#" onclick="Effect.BlindDown('show_<%= group.id%>');return false;">+</a> <!-- calls the show method, but utilizes the acts_as_tree --> <%= link_to (group.name), group %> <br> <div id ="show_<%= group.id%>" style="display:none;">
For the children, however, using the following will not work because it is looking to the index method.
<% for group in Group.children %> <%= link_to (group.name), groups %>
Any pointers? Should I be using object.children to get the children? thanks