From 7adeff8cca6c079a3b5e88a527d94a8a4a6e7d9a Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Thu, 25 Jul 2019 21:07:24 +0800 Subject: [PATCH] =?UTF-8?q?git=20=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=B8=8D=E6=88=90=E5=8A=9F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 34576db66..f2d9c7fb1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -161,7 +161,7 @@ class User < ApplicationRecord end def git_mail - mail || "#{login}@educoder.net" + mail.blank? ? "#{login}@educoder.net" : mail end # 学号