Reputation: 6071
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.
Upvotes: 1
Views: 321
Reputation: 4785
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]
Upvotes: 1