update for rails 4