Use new Paperclip method
This commit is contained in:
parent
5e8dd243a3
commit
d1feaf923b
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue