gitlab-org--gitlab-foss/app/uploaders/avatar_uploader.rb
2016-12-15 12:26:36 +01:00

13 lines
250 B
Ruby

class AvatarUploader < GitlabUploader
include UploaderHelper
storage :file
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
def exists?
model.avatar.file && model.avatar.file.exists?
end
end