UI for uploading media attachments (and cancelling them)

Mostly resolves #8, though attachments are still not displayed in public view
This commit is contained in:
Eugen Rochko 2016-09-07 18:17:15 +02:00
parent 1efa8e48d1
commit 499beb4484
12 changed files with 222 additions and 18 deletions

View file

@ -19,7 +19,7 @@ class PostStatusService < BaseService
def attach_media(status, media_ids)
return if media_ids.nil? || !media_ids.is_a?(Enumerable)
media = MediaAttachment.where(status_id: nil).where(id: media_ids.take(2).map { |id| id.to_i })
media = MediaAttachment.where(status_id: nil).where(id: media_ids.take(4).map { |id| id.to_i })
media.update(status_id: status.id)
end