Jonathan Martin
Articles tagged “ancestry”
-
Short and Sweet: Why You Should Use Ancestry
~ by Jonathan Martin
I know I know, it’s been close to a month since I last blogged — that’s because I’ve been working and feeling hobby-lazy on the weekends, and I’m still in the middle of writing an approximately 6–8 page (single spaced!) essay, so I’m a little preoccupied…
Okay, what’s the deal with Ancestry?
First off, it’s a slick and polished gem — strike one. Second, it addresses a very common need — strike two. Finally, it is Rails 3 savvy and efficient — home run!
In all seriousness, Ancestry is perhaps one of the handiest gems I’ve used of late. Typically, setting up trees with ActiveRecord is relatively easy — but as the model logic grows, the ease of use/implementation fails. Query calls increase recursively with every layer of the tree, and scopes have to be manually called at each layer.