Permalink
Browse files

Pass seconds arg to uploaders when clearing cache.

Currently running this fails:

``` ruby
# Remove anything older than an hour
CarrierWave.clean_cached_files!(60*60) 
```
  • Loading branch information...
1 parent 7b96c41 commit ec15e528849908900679ab1a39d91dcbdf3e71b7 @mariovisic mariovisic committed Aug 22, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/carrierwave.rb
View
@@ -15,8 +15,8 @@ def configure(&block)
CarrierWave::Uploader::Base.configure(&block)
end
- def clean_cached_files!
- CarrierWave::Uploader::Base.clean_cached_files!
+ def clean_cached_files!(seconds=60*60*24)
+ CarrierWave::Uploader::Base.clean_cached_files!(seconds)
end
end

0 comments on commit ec15e52

Please sign in to comment.