all changes for updating to rails4