From ce381b24d660a481fc16054d2f7d454234cea248 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Wed, 3 Jul 2019 18:05:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D/n=E7=9A=84=E9=97=AE?= =?UTF-8?q?=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 1b3349467..d28a42eb6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -407,7 +407,7 @@ class User < ApplicationRecord name = lastname + firstname name.blank? ? (nickname.blank? ? login : nickname) : name - name.gsub(/\s+/, '').strip #6.11 -hs + name.gsub(/\s+/, '').gsub(/\n/, '').strip #6.11 -hs end # 用户是否选题毕设课题