Module: Carrierwave::Base64::Adapter
- Defined in:
- lib/carrierwave/base64/adapter.rb
Overview
Module with .mount_base64_uploader method, that is mixed in to ActiveRecord::Base or Mongoid::Document::ClassMethods
Instance Method Summary collapse
-
#mount_base64_uploader(attribute, uploader_class, options = {}, &block) ⇒ Symbol
Mounts the carrierwave uploader that can accept a base64 encoded string as input.
Instance Method Details
#mount_base64_uploader(attribute, uploader_class, options = {}, &block) ⇒ Symbol
Mounts the carrierwave uploader that can accept a base64 encoded string as input. It also accepts regular file uploads.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/carrierwave/base64/adapter.rb', line 28 def mount_base64_uploader(attribute, uploader_class, = {}, &block) mount_uploader attribute, uploader_class, , &block [:file_name] ||= proc { attribute } Carrierwave::Base64::MountingHelper.check_for_deprecations() Carrierwave::Base64::MountingHelper.define_writer( self, attribute, ) end |