app/views/users/index.html.erb
<h1>Listing Users</h1>
<table>
<thead>
<tr>
<% if current_user.admin? %><th>ID</th><% end %>
<th>Email</th>
<th>Phone number</th>
<th>Notifications Enabled</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<% if current_user.admin? %><td><%= user.id %></td><% end %>
<td><%= user.email %></td>
<td><%= user.phone_number %></td>
<td><%= user.notifications_enabled %></td>
<td><%= link_to 'Show', user %></td>
<td><%= link_to 'Edit', edit_user_path(user) %></td>
<td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>