From 0c1fc57f1517c6381013c21e1b8d9b9a007cd456 Mon Sep 17 00:00:00 2001 From: nccu Date: Fri, 7 Nov 2014 20:17:19 +0800 Subject: [PATCH] fix --- app/controllers/announcements_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index f476c9c..254f364 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -16,6 +16,7 @@ class AnnouncementsController < ApplicationController announcements_count = announcements.count keyword = params[:unit] elsif params[:tag] + !params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"} announcements = Bulletin.where(:title.ne => "" ,:is_preview.in=>[false,nil]).is_approved.order_by(sort).filter_by_categories(["all"]).filter_by_tags([params[:tag]]) else !params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"}