diff options
author | Johann Pardanaud <pardanaud.j@gmail.com> | 2016-02-10 13:08:53 +0100 |
---|---|---|
committer | Johann Pardanaud <pardanaud.j@gmail.com> | 2016-02-10 13:09:13 +0100 |
commit | 3ca16ec2ecd5d999f60ea9f667428184675c610e (patch) | |
tree | d97b7bfcaf40fa79b5e60ccca6a588ad2d6f359a /app/uploaders | |
parent | 6d5808801f460ed2c7bb99a316687202f2f70282 (diff) | |
download | gitlab-ce-3ca16ec2ecd5d999f60ea9f667428184675c610e.tar.gz |
Fix failing tests introduced in commit 6d58088
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/avatar_uploader.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb index ec9e285b266..239c99e06dc 100644 --- a/app/uploaders/avatar_uploader.rb +++ b/app/uploaders/avatar_uploader.rb @@ -11,8 +11,10 @@ class AvatarUploader < CarrierWave::Uploader::Base process :cropper def cropper - manipulate! do |img| - img.crop "#{model.avatar_crop_size}x#{model.avatar_crop_size}+#{model.avatar_crop_x}+#{model.avatar_crop_y}" + if model.instance_of? User + manipulate! do |img| + img.crop "#{model.avatar_crop_size}x#{model.avatar_crop_size}+#{model.avatar_crop_x}+#{model.avatar_crop_y}" + end end end |