add photo size adjust

This commit is contained in:
yafeilee 2014-05-26 20:31:41 +08:00
parent bba190697d
commit 0e51685dcf
1 changed files with 9 additions and 1 deletions

View File

@ -9,7 +9,15 @@ class PhotoUploader < CarrierWave::Uploader::Base
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
process :resize_to_limit => [680,nil]
process :resize_to_limit => [1200,nil]
version :medium do
process :resize_to_limit => [640,nil]
end
version :small do
process :resize_to_limit => [400,nil]
end
def extension_white_list
%w(jpg jpeg gif png)