fix library

dev_bj
p31729568 6 years ago
parent 0b41298aa0
commit a40ff91f9e

@ -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

Loading…
Cancel
Save