From ff422a309e19fd7c217674615cdc1e31f3bfddf2 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 24 Dec 2019 19:47:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 884e32a8..92173fc3 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -396,7 +396,7 @@ class ManagementsController < ApplicationController # ๆœ็ดข้•œๅƒ def mirror_search @scope = [] - if params[:q] && params[:q].lstrip.rstrip != "" + if params[:q] && params[:q].strip != "" @scope = MirrorRepository.where("name like ?", "%#{params[:q]}%").map(&:name) end respond_to do |format| From f8a0d6684f444711859f29e7ed112c63a1718a2e Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Thu, 6 Feb 2020 22:35:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ecloud=20=E5=8D=95=E7=82=B9=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ecloud_controller.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index 3e02c579..9ac9f9ab 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -284,14 +284,14 @@ class EcloudController < ApplicationController self.logged_user = user user = UserExtensions.where(:user_id => User.current.id).first - if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil? - redirect_to my_account_path - elsif user.identity == 3 && user.school_id.nil? - redirect_to my_account_path - else - redirect_to User.current - end - + # if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil? + # redirect_to my_account_path + # elsif user.identity == 3 && user.school_id.nil? + # redirect_to my_account_path + # else + # redirect_to User.current + # end + redirect_to User.current end