Module: CarrierWave
- Defined in:
- lib/carrierwave.rb,
lib/carrierwave/mount.rb,
lib/carrierwave/uploader.rb,
lib/carrierwave/orm/sequel.rb,
lib/carrierwave/storage/s3.rb,
lib/carrierwave/orm/mongoid.rb,
lib/carrierwave/storage/file.rb,
lib/carrierwave/uploader/url.rb,
lib/carrierwave/test/matchers.rb,
lib/carrierwave/orm/datamapper.rb,
lib/carrierwave/sanitized_file.rb,
lib/carrierwave/uploader/cache.rb,
lib/carrierwave/uploader/proxy.rb,
lib/carrierwave/uploader/store.rb,
lib/carrierwave/orm/mongomapper.rb,
lib/carrierwave/storage/grid_fs.rb,
lib/carrierwave/uploader/remove.rb,
lib/carrierwave/orm/activerecord.rb,
lib/carrierwave/storage/abstract.rb,
lib/carrierwave/uploader/download.rb,
lib/carrierwave/uploader/versions.rb,
lib/carrierwave/processing/rmagick.rb,
lib/carrierwave/uploader/callbacks.rb,
lib/carrierwave/uploader/mountable.rb,
lib/carrierwave/storage/cloud_files.rb,
lib/carrierwave/uploader/processing.rb,
lib/carrierwave/uploader/default_url.rb,
lib/carrierwave/processing/mini_magick.rb,
lib/carrierwave/uploader/configuration.rb,
lib/carrierwave/compatibility/paperclip.rb,
lib/carrierwave/processing/image_science.rb,
lib/carrierwave/uploader/extension_whitelist.rb
Defined Under Namespace
Modules: ActiveRecord, Compatibility, DataMapper, ImageScience, MiniMagick, MongoMapper, Mongoid, Mount, RMagick, Sequel, Storage, Test, Uploader Classes: DownloadError, FormNotMultipart, IntegrityError, InvalidParameter, ProcessingError, SanitizedFile, UploadError
Constant Summary collapse
- VERSION =
"0.4.5"
Class Attribute Summary collapse
-
.root ⇒ Object
Returns the value of attribute root.
Class Method Summary collapse
- .clean_cached_files! ⇒ Object
- .configure(&block) ⇒ Object
-
.generate_cache_id ⇒ Object
Generates a unique cache id for use in the caching system.
Class Attribute Details
Class Method Details
.clean_cached_files! ⇒ Object
20 21 22 |
# File 'lib/carrierwave.rb', line 20 def clean_cached_files! CarrierWave::Uploader::Base.clean_cached_files! end |
.configure(&block) ⇒ Object
16 17 18 |
# File 'lib/carrierwave.rb', line 16 def configure(&block) CarrierWave::Uploader::Base.configure(&block) end |
.generate_cache_id ⇒ Object
Generates a unique cache id for use in the caching system
Returns
- String
-
a cache id in the format YYYYMMDD-HHMM-PID-RND
18 19 20 |
# File 'lib/carrierwave/uploader/cache.rb', line 18 def self.generate_cache_id Time.now.strftime('%Y%m%d-%H%M') + '-' + Process.pid.to_s + '-' + ("%04d" % rand(9999)) end |