= render partial: 'menu' h1 Screenshots uploaded by you = render(partial: 'packages/paginator', locals: {items: @screenshots}) - if @screenshots.any? table thead tr th Uploaded th Package th Screenshot tbody - @screenshots.each do |ss| tr td #{time_ago_in_words ss.created_at} ago td = link_to ss.package.name, ss.package td - if ss.package .image / This leads to an N+1 SQL query for each image. Ideas for optimization welcome. = small_img(ss, cls: '') / = link_to ss.id, package_path(ss.package, highlight: ss.id) - else p You haven't uploaded any screenshots yet.