views:

38

answers:

1

Hi,

I was wondering how I could go about creating a list of users four columns wide?

Right now each user is just printed on a single row with a division.

Thank you.

+1  A: 

I suppose you are looking for a Rails solution and not an CSS one? Think you can do this both in CSS and Rails.

Do you want something like this (see here for more examples)?

 @users.in_groups_of(4) {|user| user.name}
 ["Tony", "John", "Frank", "Bill"]
 ["Dave", nil, nil]
Cimm
in_groups_of(4) doesn't seem to work. I'll take a CSS solution if you have one?
Brian
I got it to work. Thank you for the help!
Brian