Remove unused param on both method and call, using class variable instead
This commit is contained in:
@@ -30,7 +30,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||||||
identity = Identity.first_or_create_from_oauth(auth)
|
identity = Identity.first_or_create_from_oauth(auth)
|
||||||
@user = current_user || identity.user || User.first_or_initialize_for_oauth(auth)
|
@user = current_user || identity.user || User.first_or_initialize_for_oauth(auth)
|
||||||
|
|
||||||
if save_user(@user)
|
if save_user
|
||||||
identity.update(user: @user)
|
identity.update(user: @user)
|
||||||
sign_in_and_redirect @user, event: :authentication
|
sign_in_and_redirect @user, event: :authentication
|
||||||
set_flash_message(:notice, :success, kind: "#{provider}".capitalize) if is_navigational_format?
|
set_flash_message(:notice, :success, kind: "#{provider}".capitalize) if is_navigational_format?
|
||||||
@@ -40,8 +40,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def save_user(user)
|
def save_user
|
||||||
@user.save || @user.save_requiring_finish_signup
|
@user.save || @user.save_requiring_finish_signup
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user