<%= form_for @user do |f| %>
<%= f.label :email, "Email" %>
<%= f.email_field :email %>
<%= f.label :name, "Nome completo" %>
<%= f.text_field :name %>
<%= f.label :username, "Nome de usuário" %>
<%= f.text_field :username %>
<%= f.label :password, "Senha" %>
<%= f.password_field :password %>
<%= f.label :active, "Ativo" %>
<%= f.check_box :active %>

Grupos

<%= f.fields_for :group_users do |b| %> <%= render 'group_user_fields', f: b %> <% end %>
<%= f.submit %>
or <%= link_to :cancel, users_path %>
<% end %>