Watch RailsCast 005 on with_scope method.