From 2fe69f36c83f6369a1ab318b385a528728b5ce0c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 4 Nov 2019 17:26:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admins/shixun_settings_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/admins/shixun_settings_controller.rb b/app/controllers/admins/shixun_settings_controller.rb index 9919c7daa..d635ae8df 100644 --- a/app/controllers/admins/shixun_settings_controller.rb +++ b/app/controllers/admins/shixun_settings_controller.rb @@ -1,8 +1,7 @@ class Admins::ShixunSettingsController < Admins::BaseController def index - params[:sort_by] = params[:sort_by].presence || 'created_on' - params[:sort_direction] = params[:sort_direction].presence || 'desc' + default_sort('created_at', 'desc') shixun_settings = Admins::ShixunSettingsQuery.call(params) @editing_shixuns = shixun_settings.where(status:0).size