Rails Way
Posted 2007 Jan 11I think that Jamis Buck and Michael Koziarski’s The Rails Way might be the most important Rails website I’ve found to-date. Their “peer reviews” of Ruby/Rails code are top-notch. As mentioned in the comments, “The Rails Way” is great Rails consulting… for free!
In their latest review, “The Rails Way” addresses the common abuse of the id property. After reading the article, I examined some of my code and found that I was making the same mistake pretty regularly.
On many occasions I was writing:
Attendance.find(:all,:conditions => ["attendances.person_id = ?", person.id])
when I really should be using:
person.attendances.find(:all)
Clearly, this is a “forest for the trees” issue :P