Cruft
This commit is contained in:
parent
13bb26b711
commit
0571617ea7
1 changed files with 17 additions and 17 deletions
|
|
@ -144,24 +144,24 @@ class Screenshot < ApplicationRecord
|
||||||
#Digest::MD5.base64digest(Net::HTTP.get(URI(url)))
|
#Digest::MD5.base64digest(Net::HTTP.get(URI(url)))
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns a medium sized image
|
# Returns a medium sized image (Papeclip-style)
|
||||||
def medium_image
|
# def medium_image
|
||||||
if self.image.attached?
|
# if self.image.attached?
|
||||||
self.image.variant(
|
# self.image.variant(
|
||||||
resize_to_limit: [670, 600]
|
# resize_to_limit: [670, 600]
|
||||||
).processed
|
# ).processed
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
||||||
# Returns the image variant that links to a medium-size screenshot for the details page
|
# # Returns the image variant that links to a medium-size screenshot for the details page
|
||||||
def large_image_watermarked
|
# def large_image_watermarked
|
||||||
if self.image.attached?
|
# if self.image.attached?
|
||||||
self.image.variant(
|
# self.image.variant(
|
||||||
gravity: 'East',
|
# gravity: 'East',
|
||||||
draw: 'image Over 0,0 0,0 "public/logo/watermark.png"'
|
# draw: 'image Over 0,0 0,0 "public/logo/watermark.png"'
|
||||||
).processed
|
# ).processed
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue