搜索镜像

dev_local_lzdx
daiao 5 years ago
parent dfd8d1eab3
commit ff422a309e

@ -396,7 +396,7 @@ class ManagementsController < ApplicationController
# 搜索镜像 # 搜索镜像
def mirror_search def mirror_search
@scope = [] @scope = []
if params[:q] && params[:q].lstrip.rstrip != "" if params[:q] && params[:q].strip != ""
@scope = MirrorRepository.where("name like ?", "%#{params[:q]}%").map(&:name) @scope = MirrorRepository.where("name like ?", "%#{params[:q]}%").map(&:name)
end end
respond_to do |format| respond_to do |format|

Loading…
Cancel
Save