lib
This commit is contained in:
parent
2612b0a2d1
commit
46bec10aa2
1 changed files with 6 additions and 3 deletions
|
@ -112,9 +112,12 @@ module Recovery
|
|||
end
|
||||
end
|
||||
|
||||
def import(pj)
|
||||
ActiveStorage::Blob.insert(pj.blob.attributes)
|
||||
ActiveStorage::Attachment.insert(pj.attributes)
|
||||
def import(pjs)
|
||||
attachments = pjs.respond_to?(:each) ? pjs : [pjs]
|
||||
attachments.each do |pj|
|
||||
ActiveStorage::Blob.insert(pj.blob.attributes)
|
||||
ActiveStorage::Attachment.insert(pj.attributes)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue