|
|
|
@ -87,7 +87,7 @@ class CoursesController < ApplicationController
|
|
|
|
|
(course_members.role in(1,2,3) and CONCAT(users.lastname, users.firstname) like :keyword) or courses.name like :keyword
|
|
|
|
|
or schools.name like :keyword
|
|
|
|
|
}
|
|
|
|
|
@courses = @courses.joins(course_members: [user: [user_extension: :school]]).where("#{sql}", keyword: "%#{params[:search]}%")
|
|
|
|
|
@courses = @courses.joins(course_members: [user: [user_extension: :school]]).where("#{sql}", keyword: "%#{params[:search]}%").distinct
|
|
|
|
|
end
|
|
|
|
|
@courses_count = @courses.size
|
|
|
|
|
|
|
|
|
|