Class: CkeditorPictureUploader

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

Instance Method Summary collapse

Instance Method Details

#extension_white_listObject



19
20
21
# File 'app/uploaders/ckeditor_picture_uploader.rb', line 19

def extension_white_list
  Ckeditor.image_file_types
end

#store_dirObject



5
6
7
# File 'app/uploaders/ckeditor_picture_uploader.rb', line 5

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