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