fix undefined method for rails version