% results.each do |source| %> <% type = source[:type] || "Results" %>
<%= type %> from <%= link_to source[:source], source[:url] %>
<% if source[:results] %> <% if source[:results].empty? %>No results found
<% else %> <% source[:results].each do |result| %><%= result_to_html(result) %>
<% end %> <% end %> <% else %><%= source[:error] %>
<% end %> <% end %>