Skip to content

Commit 704133c

Browse files
committed
fix
1 parent cbd4239 commit 704133c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/users/passwords_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ class Users::PasswordsController < Devise::PasswordsController
66
def create
77
@email = params.dig(resource_name, :email)
88
@phone_number = params.dig(resource_name, :phone_number)
9+
@resource = @email.blank? ? User.find_by(phone_number: @phone_number) : User.find_by(email: @email)
910

1011
unless valid_params?(@email, @phone_number)
1112
render_error
1213
return if @errors
1314
end
14-
@resource = @email.blank? ? User.find_by(phone_number: @phone_number) : User.find_by(email: @email)
1515

1616
send_password
1717
redirect_to after_sending_reset_password_instructions_path_for(resource_name),

0 commit comments

Comments
 (0)