Skip to content

Commit

Permalink
Adding role field to display of users for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Shanil Puri committed Sep 27, 2014
1 parent a055d24 commit d35ed77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/views/admin/users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
<th>User Id</th>
<th>User Name</th>
<th>User Email</th>
<th>User Role</th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<td><%= user.id %></td>
<td><%= user.name %></td>
<!--<td><%#= user.posts.count %></td>-->
<td><%= user.email %></td>
<td><%= user.roles.empty? ? "Sample Role" : user.roles.first.name %></td>
</tr>
<% end %>
</tbody>
Expand All @@ -33,7 +34,7 @@
"aoColumns": [
null,
null,
// { "bSearchable": false },
null,
null
] } );
});
Expand Down

0 comments on commit d35ed77

Please sign in to comment.