diff options
author | James Lopez <james@jameslopez.es> | 2016-07-15 17:03:31 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-07-19 14:06:06 +0300 |
commit | 76771c294694bb7bae02778c30ad3c4aff27b782 (patch) | |
tree | 9c0288242c2d3c167f6f56407298f1526af09ab7 /app/uploaders | |
parent | d6bd412be4e3063c5f8844ef2c15f736f173b2f1 (diff) |
squashed - added avatar saver/restorer and specs
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.rb | 4 |
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 |