Use new Paperclip method

This commit is contained in:
Christoph Haas 2015-01-04 18:58:45 +01:00
parent 5e8dd243a3
commit d1feaf923b

View file

@ -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