From 3ca16ec2ecd5d999f60ea9f667428184675c610e Mon Sep 17 00:00:00 2001 From: Johann Pardanaud Date: Wed, 10 Feb 2016 13:08:53 +0100 Subject: Fix failing tests introduced in commit 6d58088 --- app/uploaders/avatar_uploader.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/uploaders/avatar_uploader.rb') 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 -- cgit v1.2.3