skill-assessment-app/app/views/admin/user/_table_list.html.erb
2016-09-22 16:29:19 -05:00

18 lines
459 B
Plaintext

<table cellspacing="0" cellpadding="0">
<tr>
<th>User</th>
<th>Email</th>
<th>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: 'btn tertiary-btn' } if policy(user).edit? %></td>
</tr>
<% end %>
</table>