update for rails 3