搜索镜像

dev_local_lzdx
daiao 5 years ago
parent dfd8d1eab3
commit ff422a309e

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

Loading…
Cancel
Save