|
|
|
@ -44,7 +44,7 @@ class ShixunsController < ApplicationController
|
|
|
|
|
## 搜索关键字 匹配关卡名, 用户名, 实训名 和 空格多搜索
|
|
|
|
|
if params[:keyword].present?
|
|
|
|
|
keyword = params[:keyword].strip
|
|
|
|
|
@shixuns = @shixuns.joins(:users, challenges: :challenge_tags).
|
|
|
|
|
@shixuns = @shixuns.joins(:user, challenges: :challenge_tags).
|
|
|
|
|
where("challenge_tags.name like '%#{keyword}%'
|
|
|
|
|
or challenges.subject like '%#{keyword}%'
|
|
|
|
|
or concat(lastname, firstname) like '%#{keyword}%'
|
|
|
|
|