% if flash[:error].present? %>
<%= flash[:error] %>
<% user.errors.messages.each do |k,v| %>
<%= "#{k.to_s} #{v.join(' and ')}" %>
<% end %>
<% end %>
<%= form_for user, url: action do |form| %>
<%= form.label :name, "Full Name" %>
<%= form.text_field :name %>
<%= form.label :email, "eMail" %>
<%= form.email_field :email %>
<%= form.label :role, "Role" %>
<%= form.select :role, admin_role_options(user.role), include_blank: false %>
<%= form.submit %>
<% end %>