From 7777a44673e27a81d5586d0b6dc0d14ee2c98b13 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 8 Nov 2017 11:35:53 +0800 Subject: [PATCH] FIX: Don't skip validations when updating user's email. --- lib/email_updater.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/email_updater.rb b/lib/email_updater.rb index ddb0627fef2..e8515b8645f 100644 --- a/lib/email_updater.rb +++ b/lib/email_updater.rb @@ -85,7 +85,7 @@ class EmailUpdater confirm_result = :authorizing_new when EmailChangeRequest.states[:authorizing_new] change_req.update_column(:change_state, EmailChangeRequest.states[:complete]) - user.primary_email.update_column(:email, token.email) + user.primary_email.update!(email: token.email) confirm_result = :complete end else