update for modern rails 3.