My applications currently uses the Ancestry gem to create a navigation tree.
How do I display the name of a page which is the parent of another in the index view?
i.e. currently I do...
<% @pages.each do |page| %>
<tr>
<td><%= link_to page.name, edit_page_path(page) %></td>
<td><%= page.ancestry %></td>
</tr>
<% end %>
I want the page.ancestry to be the parent's name, not the ID.
<td><%= page.parent.name %></td>
isn't it working?