TPI实训列表的搜索

dev_aliyun
cxt 5 years ago
parent 93492d98cc
commit 777fec4c00

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

Loading…
Cancel
Save