From 34b254b9c8efdc87de30830fdc400826568f0c98 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Mon, 26 Aug 2019 09:58:37 +0800 Subject: [PATCH] fix school course count error bug --- app/controllers/managements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 093b3e4e..b3d944f5 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -2084,7 +2084,7 @@ end @school_id = params[:school_id] if params[:school_id] && params[:school_id] != '' - @courses = @courses.joins("join user_extensions ue on courses.tea_id = ue.user_id").where("ue.school_id = #{params[:school_id]}") + @courses = @courses.where(school_id: params[:school_id]) end if params[:homepage_show]