summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-07-15 16:03:31 +0200
committerJames Lopez <james@jameslopez.es>2016-07-19 13:06:06 +0200
commit76771c294694bb7bae02778c30ad3c4aff27b782 (patch)
tree9c0288242c2d3c167f6f56407298f1526af09ab7 /app/uploaders
parentd6bd412be4e3063c5f8844ef2c15f736f173b2f1 (diff)
downloadgitlab-ce-76771c294694bb7bae02778c30ad3c4aff27b782.tar.gz
squashed - added avatar saver/restorer and specsfix/import-export-project-avatar
added spec for avatar saver avatar saver! added avatar restorer spec fix spec added avatar restorer class fix export service fix warnings, added changelog fix spec some refactoring based on feedback fixed a few issues after testing i/e avatar
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/avatar_uploader.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb
index 6135c3ad96f..03d9329a14e 100644
--- a/app/uploaders/avatar_uploader.rb
+++ b/app/uploaders/avatar_uploader.rb
@@ -14,4 +14,8 @@ class AvatarUploader < CarrierWave::Uploader::Base
def reset_events_cache(file)
model.reset_events_cache if model.is_a?(User)
end
+
+ def exists?
+ model.avatar.file && model.avatar.file.exists?
+ end
end