Creating Dynamic Tree Menu in Rails

Hello all,
I need a good technique to create a tree menu based off pages in a
database with RoR. So, pages would look something like this in the db:

pages (
     id
     parent_id
     title
     content
)

Obviously, the parent_id would be 0 or null for the top-level pages
and any sub-pages would have the id under parent_id. What I'm looking
for as far as a read-out is a simple unordered-list with sub-lists
under the parent's list item.. so:

<ul>
   <li>Parent
         <ul>
              <li>Child 1</li>
              <li>Child 2</li>
         </ul>
    </li>
</ul>

If I can have it be recursive that would also be great.

Thanks

Have a look into acts_as_tree.

Have a look here http://www.vaporbase.com/postings/A_Micro-CMS_in_Rails

linoj