This commit is contained in:
Marco Colli 2014-12-24 11:52:12 +01:00
parent f775d74cfd
commit 8dea4b5fd9

View file

@ -23,9 +23,9 @@ class ServicesController < ApplicationController
service = Service.initialize_from_omniauth( omniauth_hash ) service = Service.initialize_from_omniauth( omniauth_hash )
if current_user.services << service if current_user.services << service
no_profile_image_before_update = no_profile_image?
current_user.update_profile_with_omniauth(service.info) current_user.update_profile_with_omniauth(service.info)
fetch_photo(service) if no_profile_image_before_update
fetch_photo(service) if no_profile_image?
flash[:notice] = I18n.t 'services.create.success' flash[:notice] = I18n.t 'services.create.success'
else else