Class: Writer::ImageUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Includes:
CarrierWave::MiniMagick, Sprockets::Helpers::IsolatedHelper, Sprockets::Helpers::RailsHelper
Defined in:
app/uploaders/writer/image_uploader.rb

Instance Method Summary collapse

Instance Method Details

#cache_dirObject



24
25
26
# File 'app/uploaders/writer/image_uploader.rb', line 24

def cache_dir
  "system/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end

#store_dirObject

Override the directory where uploaded files will be stored. This is a sensible default for uploaders that are meant to be mounted:



20
21
22
# File 'app/uploaders/writer/image_uploader.rb', line 20

def store_dir
  "system/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end