<%= form_for(:user, :url => { :action => 'update' }, :html => {:method => :put}) do %>
<div class="box">
<div id="user_group_ids">
<% user_group_ids = @user.group_ids %>
<% Group.givable.sort.each do |group| %>
<label><%= check_box_tag 'user[group_ids][]', group.id, user_group_ids.include?(group.id), :id => nil %> <%= group %></label><br />
<% end %>
<%= hidden_field_tag 'user[group_ids][]', '' %>
</div>
<p><%= check_all_links 'user_group_ids' %></p>
</div>
<%= submit_tag l(:button_save) %>
<% end %>
