app/views/district/users/index.html.erb
<h1>Listing users</h1>
<%= form_tag district_users_path, :method=>:get do %>
<%=label_tag :last_name, "Last Name, Any part"%>
<%=text_field_tag :last_name, params[:last_name] %>
<%=submit_tag "Search by Last Name", :name=>nil %>
<% end %>
<%= will_paginate @users %>
<table>
<tr>
<th>Username</th>
<th>Fullname</th>
</tr>
<% for user in @users %>
<tr id="tr_<%=user.id%>">
<td><%= h user.username %></td>
<td><%= h user %></td>
<td><%= link_to 'Edit', edit_district_user_path(user) %></td>
<td><%= link_to 'Delete', district_user_path(user), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New user', new_district_user_path %>