Ideally the relation should be
belongs_to :head #note: head is singlular
As Marek Lipka said, one of the category could have a nil
head. So you could do
<%= category.heads.name_subcategory if category.heads %>
OR
<%= category.heads.try :name_subcategory %>
Remember to change the method call to head
, if you change the relation