I don't approve this solution, but why can't you use it ?

<% %w{parent_id child_id active notes created_at updated_at}.each do |
attribute| %>
  <td><%= h relationship.send( attribute.to_sym ) %></td>
<% end %>
  <td><%h h relationship.link_type.pcln %></td>