From 85727e261d0183f0b7fc0c4e4826da4278881ebf Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 19 Nov 2019 16:18:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E4=B8=8A=E5=AE=9E=E9=AA=8C=E5=AE=A4?= =?UTF-8?q?=E8=AF=BE=E5=A0=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 2 +- app/controllers/subjects_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 6530afdde..e7555f927 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -977,7 +977,7 @@ class ShixunsController < ApplicationController @courses = Course.where(:id => course_ids) ## 云上实验室过滤 - @courses = @courses.where(id: current_laboratory.all_courses.pluck(:id)) + @courses = @courses.where(id: current_laboratory.all_courses) @course_count = @courses.count @courses = @courses.page(page).per(limit) diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index 5e685119e..d38293a8f 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -218,7 +218,7 @@ class SubjectsController < ApplicationController AND m.user_id=#{current_user.id} AND c.is_delete = 0 AND c.is_end = 0").map(&:id) @courses = Course.where(id: course_ids) ## 云上实验室过滤 - @courses = @courses.where(id: current_laboratory.all_courses.pluck(:id)) + @courses = @courses.where(id: current_laboratory.all_courses) @none_shixun_ids = ShixunSchool.where("school_id != #{current_user.user_extension.try(:school_id).to_i}").pluck(:shixun_id) end