From e442c30823aaf821238b642e686c37cdd1c70723 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 21 Jun 2019 10:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=90=9C=E7=B4=A2=E6=9C=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 753999e54..cd1e9a0ea 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -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