课程搜索有问题

dev_course
daiao 6 years ago
parent 6c38e3e63e
commit e442c30823

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

Loading…
Cancel
Save