This is pretty ugly. I think Rails handles taking arrays of classes to helpers, which might make this more readable.