When add new social account - redirect to accounts page and show notice message

This commit is contained in:
Dmitriy Zaporozhets 2015-02-08 00:53:31 -08:00
parent 64673acf9f
commit 03c8bf39e1
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
if current_user if current_user
# Add new authentication method # Add new authentication method
current_user.identities.find_or_create_by(extern_uid: oauth['uid'], provider: oauth['provider']) current_user.identities.find_or_create_by(extern_uid: oauth['uid'], provider: oauth['provider'])
redirect_to profile_path redirect_to profile_account_path, notice: 'Authentication method updated'
else else
@user = Gitlab::OAuth::User.new(oauth) @user = Gitlab::OAuth::User.new(oauth)
@user.save @user.save