How do you keep your baby from rolling off the bed?

I am going to go buy a guard rail today at lunch so LO can sleep next to me and not in the middle of the bed.