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
|
||||||
end
|
end
|
||||||
|
|
||||||
def import(pj)
|
def import(pjs)
|
||||||
ActiveStorage::Blob.insert(pj.blob.attributes)
|
attachments = pjs.respond_to?(:each) ? pjs : [pjs]
|
||||||
ActiveStorage::Attachment.insert(pj.attributes)
|
attachments.each do |pj|
|
||||||
|
ActiveStorage::Blob.insert(pj.blob.attributes)
|
||||||
|
ActiveStorage::Attachment.insert(pj.attributes)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue