diff options
-rw-r--r-- | lib/active_vault/attached/many.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/active_vault/attached/many.rb b/lib/active_vault/attached/many.rb index 9f5f14ee85..49c6aae575 100644 --- a/lib/active_vault/attached/many.rb +++ b/lib/active_vault/attached/many.rb @@ -6,7 +6,7 @@ class ActiveVault::Attached::Many < ActiveVault::Attached end def attach(*attachables) - @attachments = attachments + Array(attachables).collect do |attachable| + @attachments = attachments + Array(attachables).flatten.collect do |attachable| ActiveVault::Attachment.create!(record_gid: record.to_gid.to_s, name: name, blob: create_blob_from(attachable)) end end |