超级管理员实训搜索规则改变

dev_local
daiao 6 years ago
parent 97e070edb0
commit 25eb878fe0

@ -114,7 +114,11 @@ class ManagementsController < ApplicationController
@sub_type = 8
@g = Gitlab.client
if params[:search]
if params[:search].to_i.to_s == params[:search].to_s
myshixun_id = Game.where(:myshixun_id => params[:search].to_i).pluck(:myshixun_id)
else
myshixun_id = Game.where(:identifier => params[:search]).pluck(:myshixun_id)
end
@myshixuns = Myshixun.where(:id => myshixun_id).includes(:shixun)
else
@myshixuns = Myshixun.where("0=0").includes(:shixun)

Loading…
Cancel
Save