|
|
|
@ -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.left_joins(course_members: [user: [user_extension: :school]]).where("#{sql}", keyword: "%#{params[:search]}%")
|
|
|
|
|
@courses = @courses.left_outer_joins(course_members: [user: [user_extension: :school]]).where("#{sql}", keyword: "%#{params[:search]}%")
|
|
|
|
|
end
|
|
|
|
|
@courses_count = @courses.size
|
|
|
|
|
|
|
|
|
|