From ada380b02cc5b8db25246f91e35e6d112c116abc Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Thu, 5 Sep 2019 23:02:28 +0800 Subject: [PATCH] yonghu --- lib/tasks/user_login.rake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/tasks/user_login.rake b/lib/tasks/user_login.rake index dcd82297a..59e861b98 100644 --- a/lib/tasks/user_login.rake +++ b/lib/tasks/user_login.rake @@ -11,7 +11,12 @@ namespace :user do no = sprintf("%04d", i) login = "#{base_login}#{no}" - user.update_attributes(:login => login, :lastname => login, :nickname => login) + puts no + puts login + user.login = login + user.lastname = login + user.nickname = login + user.save end rescue Exception => e Rails.logger.error(e.message)