|
|
|
@ -56,7 +56,7 @@ class Libraries::SaveService < ApplicationService
|
|
|
|
|
destroy_ids = old_attachment_id - attachment_ids
|
|
|
|
|
library.attachments.where(id: destroy_ids).delete_all
|
|
|
|
|
|
|
|
|
|
Attachment.where(id: attachment_ids, author_id: user.id).update_all(container_type: library.class.to_s)
|
|
|
|
|
Attachment.where(id: attachment_ids, author_id: user.id).update_all(container_type: library.class.to_s, container_id: library.id)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def library_params
|
|
|
|
|