masciugo / genealogy

Make ActiveRecord model act as a pedigree
MIT License
30 stars 17 forks source link

Limiting ancestors by generations #11

Closed estensland closed 9 years ago

estensland commented 9 years ago

I added logic to count how many generations the ancestors and descendants query methods go back. The tests pass, but I am sure there is a better way to do it, if you think of one, let me know and I'll see what I can do.

masciugo commented 9 years ago

Well done Eric. I didn't actually deeply review your code but should be ok. Just added a check on the option. Useful feature, thank you.

estensland commented 9 years ago

Thanks! Glad to be of use.