It is incomplete. Check the code (he always upload the code to Github) https://github.com/railscasts/184-formtastic-part-1/blob/master/vet/app/views/animals/show.html.erb
So, instead of:
<p>
<strong>Category:</strong>
<%=h @animal.category_id %>
</p>
Put:
<p>
<strong>Category:</strong>
<%=h @animal.category.name %>
</p>
Use the association of ActiveRecord