0

I have the following problem: I need to create a table which will look like this:

enter image description here

I'm building the table dynamically with ruby and I want to avoid having to write a "each" loop for each table row.

Is there a way to make a table "inverse"? Something like

  1. td (user1 row)
  2. tr (user1)
  3. tr (user1 Name)
  4. tr (user1 Age)

Sorry for the horrible formatting... Hope this is clear enough.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Uri Klar
  • 3,800
  • 3
  • 37
  • 75
  • 2
    I can't see how you can avoid an each loop to display a table whether by row or column as you need to iterate over the data somehow. Anyhow, maybe this previous question could help? http://stackoverflow.com/questions/2128663/display-data-in-columns-not-rows-using-ruby-on-rails –  Feb 27 '14 at 08:40
  • Thanks for the link, that question does have a good solution in it. – Uri Klar Feb 27 '14 at 09:27

0 Answers0