index.html.erb 496 B

12345678910111213141516171819202122232425
  1. <h1>Listing users</h1>
  2. <table>
  3. <tr>
  4. <th>E-Mail</th>
  5. <th>Name</th>
  6. <th></th>
  7. <th></th>
  8. <th></th>
  9. </tr>
  10. <% @users.each do |user| %>
  11. <tr>
  12. <td><%= user.email %></td>
  13. <td><%= user.name %></td>
  14. <td><%= link_to 'Show', user %></td>
  15. <td><%= link_to 'Edit', edit_user_path(user) %></td>
  16. <td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  17. </tr>
  18. <% end %>
  19. </table>
  20. <br />
  21. <%= link_to 'New User', new_user_path %>