<%- @printers.each do |printer| %>
<%= link_to printer.name, "#", :class => "printer-#{printer.id}", :style => ("background-image:url('#{printer.images.first.attachment.url(:mini)}')" if printer.images.any?) %>
<%- end %>
<%- @download_categories.each do |category| %>
<%= category.name %>
<%- category.downloads.each do |download| %>
<%= link_to download.name, download.url %>
<%- end %>
<%- end %>
<%- @printers.each do |printer| %>
<%= printer.name %>
<%- @download_categories.each do |category| %>
<%= category.name %>
<% category.downloads.each do |download| %>
<%= link_to download.name, download.url if printer.downloads.map(&:id).include? download.id %>
<% end %>
<% end %>
<%- end %>