EDIT The pricing tables\' content will all be dynamically generated, I cannot predict their height, I\'m simply using the 400px case for th
I know exactly what you're talking about as I have ran into the same issue. I don't know ruby, but the answer is simple:
for loop with a counter ii % 4 == 0, print: <%= .
This way, every 4 entries, the class='row' will stop and create a new one. and the last row will not affect the next row and the class='col' will not be affected. This also works when screen size is lowered.