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