Using new access methods for ActiveStorage instead of Paperclip

This commit is contained in:
Christoph Haas 2020-04-20 20:12:10 +02:00
parent 01024c771b
commit ce881343e2
8 changed files with 16 additions and 16 deletions

View file

@ -19,7 +19,7 @@
// TODO: smarter search for the best screenshot instead of taking the first one
- screenshot = pkg.screenshots.first
a.black title=screenshot.caption href=package_path(name: pkg.name)
= image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
= image_tag(screenshot.image.variant("800x600", timestamp: false), alt: screenshot.caption)
/- if pkg.screenshots.length > 1
a.black href=package_path(name: pkg.name)
'and #{pluralize(pkg.screenshots.length-1, 'screenshot')} more…