2011-04-01 00:34:19 +00:00
|
|
|
module Extensions
|
|
|
|
module Asset
|
|
|
|
module Vignette
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2011-04-01 00:34:19 +00:00
|
|
|
def vignette_url
|
|
|
|
if self.image?
|
|
|
|
if self.width < 80 && self.height < 80
|
|
|
|
self.source.url
|
|
|
|
else
|
2011-06-20 19:05:12 +00:00
|
|
|
Locomotive::Dragonfly.resize_url(self.source, '80x80#')
|
2010-06-02 14:31:01 +00:00
|
|
|
end
|
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
end
|
2011-04-01 00:34:19 +00:00
|
|
|
|
2010-07-23 20:09:54 +00:00
|
|
|
end
|
|
|
|
end
|
2011-06-20 19:05:12 +00:00
|
|
|
end
|