Jamis Buck has put together a cool series of articles about ActiveRecord’s find method as used in Rails. He goes into a lot of detail about how find and its related methods work in terms of the internals of ActiveRecord. Jamis’ explanations are not only useful for Rails developers, but for anyone interested in patterns and how to structure code in Ruby. The Rails team don’t always do everything the ‘best’ way, but it’s usually tight, well developed code you can learn a lot from.
In the first installment, Jamis just presents a basic introduction to his series.
In the second installment, he leaps right in to the details of find and its child methods, find_from_ids, find_every and find_initial. Read More