|
|
@ -106,8 +106,6 @@ class CoursesController < ApplicationController
|
|
|
|
if params[:category_id].present? && params[:category_id].to_i != 0
|
|
|
|
if params[:category_id].present? && params[:category_id].to_i != 0
|
|
|
|
videos = videos.where(course_second_category_id: params[:category_id].to_i)
|
|
|
|
videos = videos.where(course_second_category_id: params[:category_id].to_i)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@category = @main_category.course_second_categories.find_by(id: params[:category])
|
|
|
|
|
|
|
|
tip_exception("子目录id有误") if !@category.present?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
videos = custom_sort(videos, params[:sort_by], params[:sort_direction])
|
|
|
|
videos = custom_sort(videos, params[:sort_by], params[:sort_direction])
|
|
|
|
@count = videos.count
|
|
|
|
@count = videos.count
|
|
|
|