I have a family-tree structure to a person model. I want to be able to find people by specifying an array that corresponds to the family tree. So if Abe is grandpa, homer is dad and bart is the son, bart's array would be [abe,homer,bart].
To find bart, I can't just use find_by_name("bart") as there might be another person called bart (with differnt parents and therefore a different array). So, to find this particular bart, I want to find abe first, then find homer, then bart. How can I do an ititial database query of find_by_name("abe") that will find the "abe" record as well as all his descendant records, so that any subsequent filtering is efficient and doesn't hit the database? Hope that makes sense, cheers DAZ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---