Sha256: b4779715dfd46e0e0013e6b6fa0e296711dd93b0959216882f46a1783a5b84ec

Contents?: true

Size: 351 Bytes

Versions: 4

Compression:

Stored size: 351 Bytes

Contents

module ActiveStorageSupport
  class Base64Many < ActiveStorage::Attached::Many
    def attach(*attachables)
      super base64_attachments(attachables)
    end

    def base64_attachments(attachments)
      attachments.flatten.map do |attachment|
        ActiveStorageSupport::Base64Attach.attachment_from_data(attachment)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_storage_base64-0.1.4 lib/active_storage_support/base64_many.rb
active_storage_base64-0.1.3 lib/active_storage_support/base64_many.rb
active_storage_base64-0.1.2 lib/active_storage_support/base64_many.rb
active_storage_base64-0.1.1 lib/active_storage_support/base64_many.rb