From 42a913814330a18f4f152dedc6422152158b738f Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 10 Mar 2020 15:36:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=AF=BC=E8=88=AA=E6=A0=8F?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E9=A2=91=E6=95=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/course.rb b/app/models/course.rb index b0f3414a6..abe17b3cd 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -162,7 +162,7 @@ class Course < ApplicationRecord def videos_count course_videos.where(video_id: videos.where("transcoded = 1 or videos.user_id = #{User.current.id}").pluck(:id)) - .or(course_videos.where(course_videos: {is_link: true})) + .or(course_videos.where(course_videos: {is_link: true})).size end def teacher_group(user_id)