<% for column in {tablename}.content_columns %> <th><%= column.human_name %></th> <% end %>
This is all.