lib/carrierwave/uploader/cache.rb in carrierwave-0.5.1 vs lib/carrierwave/uploader/cache.rb in carrierwave-0.5.2
- old
+ new
@@ -5,11 +5,11 @@
class FormNotMultipart < UploadError
def message
"You tried to assign a String or a Pathname to an uploader, for security reasons, this is not allowed.\n\n If this is a file upload, please check that your upload form is multipart encoded."
end
end
-
+
##
# Generates a unique cache id for use in the caching system
#
# === Returns
#
@@ -35,10 +35,10 @@
# You can call this method directly on the module like this:
#
# CarrierWave.clean_cached_files!
#
# === Note
- #
+ #
# This only works as long as you haven't done anything funky with your cache_dir.
# It's recommended that you keep cache files in one place only.
#
def clean_cached_files!
Dir.glob(File.expand_path(File.join(cache_dir, '*'), CarrierWave.root)).each do |dir|