save newly created users directly in the model
This commit is contained in:
parent
6d6c7a17ea
commit
1b0198f1d3
2 changed files with 2 additions and 1 deletions
|
@ -39,7 +39,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||
redirect_to profile_path
|
||||
else
|
||||
@user = User.find_or_new_for_omniauth(oauth)
|
||||
@user.save! if @user.try('new_record?')
|
||||
|
||||
if @user
|
||||
sign_in_and_redirect @user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue