Sha256: 1cd3c691e8b0be47b8f1ec7cdd577e37a5c697a09887d3ee6c07a2962a28b2ea

Contents?: true

Size: 289 Bytes

Versions: 5

Compression:

Stored size: 289 Bytes

Contents

module ActiveStorageSupport
  class Base64One < ActiveStorage::Attached::One
    def attach(attachable)
      super self.class.from_base64(attachable)
    end

    def self.from_base64(attachable)
      ActiveStorageSupport::Base64Attach.attachment_from_data(attachable)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active_storage_base64-3.0.0 lib/active_storage_support/base64_one.rb
active_storage_base64-2.0.0 lib/active_storage_support/base64_one.rb
active_storage_base64-1.2.0 lib/active_storage_support/base64_one.rb
active_storage_base64-1.1.0 lib/active_storage_support/base64_one.rb
active_storage_base64-1.0.0 lib/active_storage_support/base64_one.rb