实训tpi的版本库可以通过id查询

dev_haigong
daiao 6 years ago
parent 8950bafb18
commit 38eb71d7f2

@ -158,7 +158,7 @@ class ManagementsController < ApplicationController
@sub_type = 8
@g = Gitlab.client
if params[:search]
myshixun_id = Game.where(:identifier => params[:search]).pluck(:myshixun_id)
myshixun_id = Game.where("identifier = #{params[:search]} or id = #{params[:search]}").pluck(:myshixun_id)
@myshixuns = Myshixun.where(:id => myshixun_id).includes(:shixun)
else
@myshixuns = Myshixun.where("0=0").includes(:shixun)

Loading…
Cancel
Save