From 125a0879ecd4bdf1c4bdd365d8bf2742a89144b1 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 22 Jan 2020 21:52:32 +0800 Subject: [PATCH] fix sort error --- app/controllers/seminars_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index c3ece27..6e07ed7 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -7,9 +7,8 @@ class SeminarsController < ApplicationController def index time_now = Time.now - - seminars = SeminarMain.filter_by_categories.desc(:signup_start_date).page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count) - + + seminars = SeminarMain.all.desc(:seminar_start_date).filter_by_categories { "seminars" => seminars, 'time_now' => time_now,