update for rails4