Before the cake was cut, the bride would gather all of the unmarried girls at the wedding, and allow each to pull one of the ribbons from the cake.
Tradition had it that the girl who pulled the ribbon with the ring on the end would be the next one to get married. It's kind of like a girl catching the bouquet at an American wedding.
Some families also had the baker attach a tiny thimble to the end of one of the ribbons. The girl who pulled out the thimble was said to be condemned to live the life of an old maid!