summaryrefslogtreecommitdiff
path: root/app/views/users/index.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/users/index.html.erb')
-rw-r--r--app/views/users/index.html.erb31
1 files changed, 31 insertions, 0 deletions
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
new file mode 100644
index 0000000..3692112
--- /dev/null
+++ b/app/views/users/index.html.erb
@@ -0,0 +1,31 @@
+<h1>Listing users</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Email</th>
+ <th>User name</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @users.each do |user| %>
+ <tr>
+ <td><%= user.name %></td>
+ <td><%= user.email %></td>
+ <td><%= user.user_name %></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>
+
+<%= link_to 'New User', new_user_path %>