The 15 Step Rails Code Quality Checklist
The Ruby on Rails Code Quality Checklist is a 15 point "quality checklist" for Rails developers to run against their Rails applications by Matthew Paul Moore. It's a year old, so predates Rails 2.2 and 2.3, but it recently made the rounds at the main social bookmarking sites, and I felt it was worth bringing up.
The first 5 of Matthew's points - in a very basic summary - are:
- Each controller action only calls one model method other than an initial find or new
- Only one or two instance variables are shared between each controller and view
- All model and variable names are both immediately obvious (to a new developer) and as short as possible without using abbreviations.
- All custom "finds" accessed from more than one place in the code use named_scope instead of a custom method.
- A .find or .find_by_ is never called in a view or view helper.
To learn the rest, you'll need to check out his article. He doesn't just list the points. He goes into further detail about every one. A great read.