example/rails-4.2/app/views/users/index.html.erb
<p id="notice"><%= notice %></p>
<h3>Previously added users</h3>
<% if @users.any? %>
<table>
<thead>
<tr>
<th>Name</th>
<th>Phone</th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<td><%= user.name %></td>
<td><%= user.phone %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p>You haven't added any users yet.</p>
<% end %>
<br>
<%= link_to 'Add new user', new_user_path, :class => 'btn' %>