From 4a584b2f8f5163b8050bd49b2f04ba9ff2e7612f Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 9 Jun 2020 00:07:35 +0800 Subject: [PATCH] Fix important bug. --- app/helpers/announcements_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/announcements_helper.rb b/app/helpers/announcements_helper.rb index 59eedf0..bde1e22 100644 --- a/app/helpers/announcements_helper.rb +++ b/app/helpers/announcements_helper.rb @@ -220,7 +220,7 @@ module AnnouncementsHelper else all_sorted = feeds_anns.select{|v| v['is_top']}.sort{|v1,v2| v2["postdate"]<=>v1["postdate"]} + feeds_anns.select{|v| v['is_top'] != true}.sort{|v1,v2| v2["postdate"]<=>v1["postdate"]} end - all_filter = filter_by_keywords(all_sorted,params[:keywords],params[:stime].params[:etime]) + all_filter = filter_by_keywords(all_sorted,params[:keywords],params[:stime],params[:etime]) else all_filter = filter_by_keywords(announcements,params[:keywords],params[:stime],params[:etime]) end