Fetch remote image using http.rb (#3114)
This commit is contained in:
parent
b11c4326d2
commit
79ef8b3653
8 changed files with 46 additions and 32 deletions
|
@ -36,6 +36,7 @@ class PreviewCard < ApplicationRecord
|
|||
has_attached_file :image, styles: { original: '120x120#' }, convert_options: { all: '-quality 80 -strip' }
|
||||
|
||||
include Attachmentable
|
||||
include Remotable
|
||||
|
||||
validates :url, presence: true
|
||||
validates_attachment_content_type :image, content_type: IMAGE_MIME_TYPES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue