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)))
|
||||
end
|
||||
|
||||
# Returns a medium sized image
|
||||
def medium_image
|
||||
if self.image.attached?
|
||||
self.image.variant(
|
||||
resize_to_limit: [670, 600]
|
||||
).processed
|
||||
end
|
||||
end
|
||||
# Returns a medium sized image (Papeclip-style)
|
||||
# def medium_image
|
||||
# if self.image.attached?
|
||||
# self.image.variant(
|
||||
# resize_to_limit: [670, 600]
|
||||
# ).processed
|
||||
# end
|
||||
# end
|
||||
|
||||
# Returns the image variant that links to a medium-size screenshot for the details page
|
||||
def large_image_watermarked
|
||||
if self.image.attached?
|
||||
self.image.variant(
|
||||
gravity: 'East',
|
||||
draw: 'image Over 0,0 0,0 "public/logo/watermark.png"'
|
||||
).processed
|
||||
end
|
||||
end
|
||||
# # Returns the image variant that links to a medium-size screenshot for the details page
|
||||
# def large_image_watermarked
|
||||
# if self.image.attached?
|
||||
# self.image.variant(
|
||||
# gravity: 'East',
|
||||
# draw: 'image Over 0,0 0,0 "public/logo/watermark.png"'
|
||||
# ).processed
|
||||
# end
|
||||
# end
|
||||
|
||||
private
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue