Skip to content

Commit a6d54d4

Browse files
committed
Merge pull request coderwall#172 from seuros/avatardev
Avatar is not present when Developer Strategy is used
2 parents 872f17f + e4e6e73 commit a6d54d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/models/concerns/user_oauth.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def for_omniauth(auth)
5151
backup_email: auth[:info][:email],
5252
location: location_from(auth))
5353
#FIXME VCR raise an error when we try to download the image
54-
user.avatar.download! avatar_url_for(auth) unless Rails.env.test?
54+
avatar_url = avatar_url_for(auth)
55+
user.avatar.download! avatar_url if avatar_url.present? && !Rails.env.test?
5556
user.apply_oauth(auth)
5657
user.username = auth[:info][:nickname]
5758
end

config/environments/development.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
config.action_controller.perform_caching = false
77
config.action_dispatch.best_standards_support = :builtin
8-
config.action_mailer.delivery_method = :letter_opener
98
config.action_mailer.raise_delivery_errors = false
109
config.active_support.deprecation = :log
1110
config.assets.compile = true

0 commit comments

Comments
 (0)