金课的首页

dev_hs
cxt 6 years ago
parent b039fd5839
commit 1ca4196095

@ -62,6 +62,9 @@ class CoursesController < ApplicationController
@courses = Course.where(is_delete: 0, is_hidden: 0, is_end: 0)
end
# 金课未开课的不显示在首页
@courses = @courses.where("start_date is null or start_date <= '#{Date.today}'")
# 根据搜索关键字进一步筛选
if params[:search].present?
# REDO:Extension

Loading…
Cancel
Save