Programming phoenix Chapter 3. Controllers page 54

It uses the user.html.eex to get rid of duplication but to me it seems that it doesn’t work

The following code for index.html.eex doesn’t work but it compiles:

<tr>
<td><%= render("user.html", users: @users) %></td>
<td><%= link "View", to: Routes.user_path(@conn, :show, @users.id) %></td>
</tr>

The following doesn’t compile:

<tr>
<td><%= render("user.html", users: users) %></td>
<td><%= link "View", to: Routes.user_path(@conn, :show, users.id) %></td>
</tr>