Closed destinyd closed 8 years ago
增加两个 scope 查询 scope 查询用法可以参考 http://guides.ruby-china.org/active_record_querying.html#作用域
# 返回最新课程(列表) KcCourses::Course.recent # 返回热门课程(列表) KcCourses::Course.hot
根据参加学习的用户的多少来排序(能通过正在学习的用户的多少来排序,则更加准确)
增加两个 scope 查询 scope 查询用法可以参考 http://guides.ruby-china.org/active_record_querying.html#作用域
热门课程
根据参加学习的用户的多少来排序(能通过正在学习的用户的多少来排序,则更加准确)