Class: CkeditorAttachmentFileUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Includes:
Ckeditor::Backend::CarrierWave
Defined in:
app/uploaders/ckeditor_attachment_file_uploader.rb

Instance Method Summary collapse

Instance Method Details

#extension_white_listObject



8
9
10
# File 'app/uploaders/ckeditor_attachment_file_uploader.rb', line 8

def extension_white_list
  Ckeditor.attachment_file_types
end

#store_dirObject



4
5
6
# File 'app/uploaders/ckeditor_attachment_file_uploader.rb', line 4

def store_dir
  Rails.env.test? ? "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" : "#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end