0
0
Fork 0

PostStatusService can attach media to status, ProcessFeedService likewise

This commit is contained in:
Eugen Rochko 2016-09-05 18:39:53 +02:00
parent ae1fac0062
commit eec0dc46a6
12 changed files with 32 additions and 85 deletions

View file

@ -10,4 +10,12 @@ class MediaAttachment < ApplicationRecord
def local?
self.remote_url.blank?
end
def file_remote_url=(url)
unless self[:file_remote_url] == url
self.file = URI.parse(url)
end
self[:file_remote_url] = url
end
end