超级管理员的tpi实训列表增加game_id搜索

dev_aliyun
cxt 5 years ago
parent eca357f674
commit 2b4367322b

@ -178,7 +178,9 @@ class ManagementsController < ApplicationController
@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)
myshixun_id = Game.where(myshixun_id => params[:search].to_i).pluck(:myshixun_id)
game_myshixun_id = Game.where(id => params[:search].to_i).pluck(:myshixun_id)
myshixun_id = myshixun_id + game_myshixun_id
else
myshixun_id = Game.where(:identifier => params[:search]).pluck(:myshixun_id)
end

Loading…
Cancel
Save