From 3fd516c2b252ea5e799045e5b20583718abe7319 Mon Sep 17 00:00:00 2001 From: Nicolae Claudius Date: Sun, 19 Jan 2014 10:11:54 +0200 Subject: [PATCH] uniform calls --- app/controllers/users/omniauth_callbacks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index 7f0efdd..579a5e1 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -23,7 +23,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController else raise "Bad provider data: #{auth.inspect}" end - if !user + if user.nil? user = User.new(user_attrs.merge(password: Devise.friendly_token[0,20])) user.skip_confirmation! user.save!(validate: false)