Class: CarrierWave::Uploader::Base
- Inherits:
-
Object
- Object
- CarrierWave::Uploader::Base
show all
- Includes:
- Base64Download
- Defined in:
- lib/locomotive/carrierwave/base.rb,
lib/locomotive/carrierwave/patches.rb
Instance Method Summary
collapse
#download!
Instance Method Details
#build_store_dir(*args) ⇒ Object
79
80
81
82
83
84
85
86
87
|
# File 'lib/locomotive/carrierwave/patches.rb', line 79
def build_store_dir(*args)
default_dir = self.class.store_dir
if default_dir.blank? || default_dir == 'uploads'
File.join(args.map(&:to_s))
else
File.join([default_dir] + args.map(&:to_s))
end
end
|
#to_label ⇒ Object
5
6
7
|
# File 'lib/locomotive/carrierwave/base.rb', line 5
def to_label
File.basename(self.to_s, File.extname(self.to_s))
end
|
#to_liquid ⇒ Object
9
10
11
|
# File 'lib/locomotive/carrierwave/base.rb', line 9
def to_liquid
Locomotive::Liquid::Drops::Uploader.new(self)
end
|