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"}