diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 0d57253f5..f24453e27 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -118,7 +118,7 @@ class CoursesController < ApplicationController .or(videos.where(videos: {user_id: current_user.id})) .or(videos.where(course_videos: {is_link: true})) .select("course_videos.id, course_videos.title, course_videos.link, course_videos.user_id") - @count = videos.count + @count = videos.count("videos.id") logger.info("#######count:#{@count}") @videos = paginate videos end