<% if fields.empty? %> <%% for feature in features do -%> <%%= debug feature %> <%% end %> <% else %> <% aliases.each_with_index do |title, i| %> <% end %> <%% for feature in features do -%> <% fields.each_with_index do |field, i| %> <% end %> <%% end %>
<%= title %>
<%%= feature.<%= field %> %>
<% end %>