Add rails4 compability