app/views/users/index.html.erb
<h1>All users</h1>
<%= form_tag(users_path, method: :get) do %>
<div class="form-group">
<label for="search">Search by email</label>
<%= text_field_tag(:search, params[:search], class: "form-control", id: "search") %>
</div>
<%= submit_tag(:search, class: "btn btn-primary") %>
<% end %>
<br>
<% if @users %>
<%= render @users %>
<% end %>