Editing Group: <%= h @group.name %>

<%= form_for(@group, html: { class: 'square' }) do |f| %> <%= render 'shared/errors', messages: @group.errors.full_messages %>
<%= f.label :name %> <%= f.text_field :name %>
<%= f.submit 'Update' %>
<% end %>
<% @group.groupers.each do |grouper| %> <% end %>
Username Real Name Task
<%= namelink grouper.user %> <%= h grouper.user.realname %> <%= form_for grouper do |g| %>
<%= g.text_field :task, size: 20 %>
<%= g.submit 'Update', class: 'button tiny' %> <%= link_to 'Remove', grouper, method: :delete, class: 'button remove' %>
<% end %>

Add a Member

<%= form_for @group.groupers.build, html: { class: 'square' } do |f| %> <%= f.hidden_field :group_id %>
<%= f.label :username %> <%= f.text_field :username %>
<%= f.label :task, "Role" %> <%= f.text_field :task %>
<%= f.submit 'Add Member' %>
<% end %>