summaryrefslogtreecommitdiff
path: root/app/views/users/index.html.erb
blob: f3e970b317d4946d56ab7761db3b992375486e73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<h1>Listing users</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Email</th>
  </tr>

<% @users.each do |user| %>
  <tr>
    <td><%=h user.name %></td>
    <td><%=h user.email %></td>
    <td><%= link_to 'Show', user %></td>
    <td><%= link_to 'Edit', edit_user_path(user) %></td>
    <td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New user', new_user_path %>