update for newer rails version