Nested resources and hierarchical trees


#1

Hi

I’ve started a project recently and decided to use the rest capabilities
of
rails.
I generated a few resources with scaffold_resource and did some nesting:

map.resources :roots do |roots|
roots.resources :children do |children|
children.resources :subchildren do |subchildren|
subchildren.resources :subsubchildren
end
end
end

( I’ve changed the names of the resources in this post for the sake of
simplicity :wink: )

Now i want to have a overview page which shows ALL resources
hierarchical starting with the root resource (like act_as_tree or
act_as_nested_set ).
How can i do that?

BTW: the relationships are as follows:
root has_many children
children belongs_to root AND has_many subchildren
subchildren belongs_to children AND has_many subsubchildren