<% results.each do |result| %> <% if result[:type] == "item" %>

You got <%= result[:quantity] %> <%= result[:item].name %>.

<% end %> <% end %>