From 45d5f9e58b1c01023141379cf51cf0040c6a442c Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 16 Apr 2015 15:48:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=90=9C=E7=B4=A2=E6=8C=89?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 6f207d76d..e91883bee 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -40,9 +40,9 @@ class CoursesService end @courses = courses_all.visible(current_user) if params[:name].present? - @courses_all = @courses.like(params[:name]) + @courses_all = @courses.like(params[:name]).order("created_at desc") else - @courses_all = @courses; + @courses_all = @courses.order("created_at desc"); end @courses_all course_list = []