<% Group.find(:all).each do |g| %>
<%= check_box_tag("group_ids[]", g.id, group_ids.include?(g.id), :id => "group_id_#{g.id}") %>
<% end %>