I’ve been through the 60 or so slides from Obie Fernandez and Rein Henrich, part of a presentation they gave at RailsConf 2008 a few weeks ago, where they were going through code snippets of bad Rails code.
Hash#valuesto get the values of a Hash in an
Array#include?to check for aggregated objects in relationships
- use the routes’ url creation method (i.e.
[named_route]_url) as opposed to hard-coded url
- avoid the temptation to overcharge the
As you see, basic stuff.