I have this strange loop going on.
Here’s my Data for instance in a Table called GROUPS
account_id = 1
group_name = Acme
account_id = 1
group_name = Disney
account_id = 1
group_name = Pixar
/group/list.rhtml
<%= render :partial => “grouplist”, :collection => @groups %>
/group/_grouplist.rhtml
<% @groups.each do |group| %>
…/group_controller.rb
def list
@groups = Group.find_all_by_account_id(session[:user_id]);
…
Now, my view renders it like so:
- Acme
- Disney
- Pixar
- Acme
- Disney
- Pixar
- Acme
- Disney
- Pixar
I just want it to display only once
- Acme
- Disney
- Pixar
I’m sure its so simple, but I am banging my head to find out!!!