课堂首页tiaozn

dev_course
cxt 6 years ago
parent c7287122af
commit f53b5af75b

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

Loading…
Cancel
Save