skill-assessment-app/app/views/admin/user/_table_list.html.erb
2017-06-05 11:30:34 -05:00

18 lines
505 B
Plaintext

<table cellspacing="0" cellpadding="0">
<tr>
<th><%= sortable "name", "User" %></th>
<th><%= sortable "email" %></th>
<th><%= sortable "role" %></th>
<th></th>
</tr>
<% users.each do |user| %>
<tr>
<td><%= link_to user.name, admin_user_path(user.to_i) %></td>
<td><%= mail_to(user.email) %></td>
<td><%= user.role %></td>
<td><%= link_to 'edit', admin_edit_user_path(user.to_i), { class: "" } if policy(user).edit? %></td>
</tr>
<% end %>
</table>