From a40ff91f9eb78c2cba924448ea744a175c7c1a82 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 28 Jun 2019 11:21:33 +0800 Subject: [PATCH] fix library --- app/controllers/libraries_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index 4b73a246..a450aede 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -14,7 +14,7 @@ class LibrariesController < ApplicationController end search = params[:search].to_s.strip - libraries = libraries.where('title LIKE ?', "%#{search}%") if search.present? + libraries = libraries.where('title LIKE :search OR uuid LIKE :search', search: "%#{search}%") if search.present? per_page = params[:per_page].to_i <= 0 ? 20 : params[:per_page].to_i @libraries = paginateHelper libraries.includes(user: :user_extensions), per_page