Is it possible to transpose an html table (without javascript). I am creating a table with rails (and erb) from a list of objects. So this is really easy and natural to do when each line corresponds to one object. However, I need each object to appear as a column. I would like to have only one loop and describe each column, rather than doing the same loop for each column. (This does not have to be a real table, it can be a list or anything that does the trick).
Update
To clarify the issue. I don't want to transpose the array in ruby, but to display an html table with a vertical row. My actual table actually uses one part for each row that generates a cell list (td). It could be a change in the list if that helps. In any case, this is an HTML question, not a ruby one: how to display a table with rows vertically (and not horizontally).
source
share