From d1feaf923b0cd23753c00628f93c503dbb95bb59 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 4 Jan 2015 18:58:45 +0100 Subject: [PATCH] Use new Paperclip method --- app/views/packages/_grid_thumbnail.slim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/packages/_grid_thumbnail.slim b/app/views/packages/_grid_thumbnail.slim index 77bfbd1..92c331f 100644 --- a/app/views/packages/_grid_thumbnail.slim +++ b/app/views/packages/_grid_thumbnail.slim @@ -2,7 +2,9 @@ a.black href=package_path(name: pkg.name) div.grid-thumbnail - if pkg.screenshots.any? - img src=pkg.screenshots[0].url('small') + // TODO: smarter search for the beste screenshot instead of taking the first one + - screenshot = pkg.screenshots.first + = image_tag(screenshot.image.url(:thumb, timestamp: false), alt: screenshot.caption) - else img.screenshot src="/images/dummy/no-screenshots-upload-one.svg" div