Got abilities working on index; next need to separate users from members from cards.
This commit is contained in:
@@ -8,10 +8,12 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<a href="/users">Users</a>
|
||||
<a href="/door_logs">Logs</a>
|
||||
<%= link_to 'Users', users_path if user_signed_in? %>
|
||||
<%= link_to 'Logs', door_logs_path if user_signed_in? %>
|
||||
<%= link_to 'Profile', edit_user_registration_path if user_signed_in? %>
|
||||
<%= link_to 'Sign out', destroy_user_session_path, :method => :delete if user_signed_in? %>
|
||||
<%= link_to 'Sign in', new_user_session_path unless user_signed_in? %>
|
||||
<%= link_to 'Sign up', new_user_registration_path unless user_signed_in? %>
|
||||
</div>
|
||||
<p class="notice"><%= notice %></p>
|
||||
<p class="alert"><%= alert %></p>
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @users.each do |user| %>
|
||||
|
||||
<% if !@users.blank? %>
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= user.name %></td>
|
||||
<td><%= user.card_id %></td>
|
||||
@@ -23,6 +24,7 @@
|
||||
<td><%= link_to 'Edit', edit_user_path(user) %></td>
|
||||
<td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user