bed rails for a six month old

We're going away in a caravan in September where there will be single beds against the wall of the caravan. We're looking to get a bed rail to stop her wriggling out of the side and have looked at the foam ones on Amazon and also the traditional metal ones ... my only concern is that the metal ones don't do the length of the bed whereas the foam ones will .... anyone with any knowledge or recommendations?