Sha256: 92fa6784655b3f950fdffc672782aab8c0fbcd07d5dd807b303654aac580c2b7
Contents?: true
Size: 739 Bytes
Versions: 20
Compression:
Stored size: 739 Bytes
Contents
module Locomotive module Concerns module Asset module Vignette def vignette_url if self.image? if self.width < 85 && self.height < 85 self.source.url else Locomotive::Dragonfly.resize_url(self.source, '85x85#') end elsif self.pdf? Locomotive::Dragonfly.thumbnail_pdf(self.source, '85x85#') end end def alternative_vignette_url format = if self.image? && self.width && self.height '190x120>' elsif self.pdf? '190x120#' end Locomotive::Dragonfly.thumbnail_pdf(self.source, format) if format end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems