Searching an acts_as_tree model

If I have a Person model that acts_as_tree, how can I find a
particular person by drilling down through the family tree?


for this family:

   > >
Amy Dave
   > >
Bob Bob

The urls

/john/amy/bob and /john/dave/bob

should find a different Person object. At the moment, I am doing it
like this:

      people = (params[:people])
      people.each do |person|
        if person == people.first
          @person = Page.find_by_name(people.first)
          @person = @person.children.find_by_name(person

This hits the database quite a few times though. Is there a better way
to drill down to find the people?