From d957d57b4b01de4d0574dc7063098633e88c2168 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Wed, 3 Jul 2019 18:11:11 +0800 Subject: [PATCH] add log --- app/models/user.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index d28a42eb6..ca8913526 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -406,8 +406,10 @@ class User < ApplicationRecord return '游客' unless logged? name = lastname + firstname - name.blank? ? (nickname.blank? ? login : nickname) : name - name.gsub(/\s+/, '').gsub(/\n/, '').strip #6.11 -hs + username = name.blank? ? (nickname.blank? ? login : nickname) : name + Rail.logger.info("3333333332222222#{username}") + username.gsub(/\s+/, '').gsub(/\n/, '').strip #6.11 -hs + end # 用户是否选题毕设课题