Check out acts_as_tree. It may be able to help you b/c it enables you to model hierarchies.
In person.rb you would have:
class Person < ActiveRecord::Base acts_as_tree :order=>"age" <-- or however you want to sort it end
Make sure that in your schema you have a field called parent_id. Somethin like: create table people ( id int not null auto_increment, parent_id int , name varchar(200) not null, created_on datetime not null, updated_on datetime not null, constraint fk_person_parent foreign key (parent_id) references people(id), primary key (id) );
When searching you can use an idiom I don't quite remember to pull up all the children as well.