|
|
@ -14,7 +14,7 @@ class Management::SchoolReportService
|
|
|
|
def call
|
|
|
|
def call
|
|
|
|
schools = School.select(select_columns_sql)
|
|
|
|
schools = School.select(select_columns_sql)
|
|
|
|
|
|
|
|
|
|
|
|
keyword = params[:keyword]&.to_s&.strip
|
|
|
|
keyword = params[:keyword].try(:to_s).try(:strip)
|
|
|
|
if keyword.present?
|
|
|
|
if keyword.present?
|
|
|
|
schools = schools.where("schools.name LIKE :keyword OR schools.id LIKE :keyword", keyword: "%#{keyword}%")
|
|
|
|
schools = schools.where("schools.name LIKE :keyword OR schools.id LIKE :keyword", keyword: "%#{keyword}%")
|
|
|
|
end
|
|
|
|
end
|
|
|
|