gallery frontend update

This commit is contained in:
devin authored and Christophe Vilayphiou committed 2012-09-12 02:05:10 +08:00
1 parent 8259dee4a3
commit 789c2df7fd
4 files changed
+126 -389

No files matched your search

+17 -1
View File
@@ -1,4 +1,19 @@
# encoding: utf-8
module CarrierWave
module Uploader
module Versions
def recreate_version!(version)
already_cached = cached?
cache_stored_file! if !already_cached
send(version).store!
if !already_cached && @cache_id
tmp_dir = File.expand_path(File.join(cache_dir, cache_id), CarrierWave.root)
FileUtils.rm_rf(tmp_dir)
end
end
end
end
end
class GalleryUploader < CarrierWave::Uploader::Base
@@ -35,7 +50,7 @@ class GalleryUploader < CarrierWave::Uploader::Base
# end
version :thumb do
process :resize_to_fill => [120, 90]
process :resize_to_fill => [150, 120]
end
# Add a white list of extensions which are allowed to be uploaded.
@@ -60,3 +75,4 @@ class GalleryUploader < CarrierWave::Uploader::Base
# end
end