Syntax fix for screenshot variants in ActiveStorage

This commit is contained in:
Christoph Haas 2020-08-21 19:12:10 +02:00
parent 771ca41240
commit 879ddcfa69
6 changed files with 14 additions and 22 deletions

View file

@ -4,7 +4,7 @@ a.black href=package_path(name: pkg.name)
- if pkg.screenshots_approved.any?
// TODO: smarter selection of the most useful screenshot instead of taking the first one
- screenshot = pkg.screenshots.first
= image_tag(screenshot.image.variant(resize_to_limit: "160x120"), alt: screenshot.caption, class: 'thumbnail')
= image_tag(screenshot.image.variant(resize_to_limit: [160,120]), alt: screenshot.caption, class: 'thumbnail')
- else
img.screenshot.thumbnail src="/images/dummy/no-screenshots-upload-one.svg"
div