A Sexy Way To Break Up A Loop

I want to take a list and break it up into 4 lists equally and depending on what list I am trying to brake up the list is going to be different. The reason I want to do this is so I can create columns. How would you take the following list, and lists like that, and have it automatically brake across a couple of lists.

<% for american_state in @american_states -%>

	<li><%= link_to american_state.name, administrative_area_path(american_state.id) %></li>

<% end -%>

Any suggestions? :slight_smile:

I think you're looking for in_groups_of:
http://weblog.rubyonrails.org/2006/3/1/new-in-rails-enumerable-group_by-and-array-in_groups_of

Pat