index.html.erb 725 字节
Newer Older
J
Justin Collins 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<h1>Listing users</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Bio</th>
    <th>Password</th>
    <th>Email</th>
    <th>Role</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @users.each do |user| %>
  <tr>
    <td><%= user.name %></td>
    <td><%= user.bio %></td>
    <td><%= user.password %></td>
    <td><%= user.email %></td>
    <td><%= user.role %></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 %>
32 33 34

<%= @something = params["something_bad"] %>
<%= render :layout => "test_layout" %>