%= form_for @group do |f| %>
<%= f.label :name, "Nome" %>
<%= f.text_field :name %>
<%= f.label :active, "Ativo" %>
<%= f.check_box :active %>
Perfis
<%= f.fields_for :role_groups do |b| %>
<%= render 'role_group_fields', :f => b %>
<% end %>
<%= link_to_add_association 'Adicionar perfil', f, :role_groups %>
<%= f.submit %>
or <%= link_to "Cancelar", groups_path %>
<% end %>