✔️ Rails v6 Upgrade

pull/1540/head
Rick Carlino 2019-10-28 09:23:12 -05:00
parent dbfec00e68
commit f16014bfd1
1 changed files with 1 additions and 7 deletions

View File

@ -43,8 +43,6 @@ class Image < ApplicationRecord
has_one_attached :attachment
def set_attachment_by_url(url)
# File
# URI::HTTPS
attachment.attach(io: open(url), filename: "image_#{self.id}")
self.attachment_processed_at = Time.now
self
@ -68,11 +66,7 @@ class Image < ApplicationRecord
end
def regular_image?
if attachment
return attachment.attached?
else
return false
end
attachment && attachment.attached?
end
def regular_url