Class: ActiveStorageSupport::Base64One

Inherits:
ActiveStorage::Attached::One
  • Object
show all
Defined in:
lib/active_storage_support/base64_one.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_base64(attachable) ⇒ Object



7
8
9
# File 'lib/active_storage_support/base64_one.rb', line 7

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

Instance Method Details

#attach(attachable) ⇒ Object



3
4
5
# File 'lib/active_storage_support/base64_one.rb', line 3

def attach(attachable)
  super self.class.from_base64(attachable)
end