From ce15f93d223f56ec59733e5c2af0d849bdc36463 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 8 Oct 2015 17:10:58 +0800 Subject: [PATCH] small fix again --- app/models/bulletin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index 2f5416b..fcfee99 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -39,7 +39,7 @@ class Bulletin before_destroy :destroy_email - scope :can_display, ->{where(:is_hidden=>false,:is_preview => false).any_of({:postdate.lt=>Time.now, :deadline.gt=>Time.now},{:postdate.lt=>Time.now, :deadline=>nil}).order_by([:postdate, :desc], [:is_top, :desc])} + scope :can_display, ->{where(:is_hidden=>false,:is_preview => false).any_of({:postdate.lt=>Time.now, :deadline.gt=>Time.now},{:postdate.lt=>Time.now, :deadline=>nil}).order_by([:is_top, :desc],[:postdate, :desc])} scope :is_approved, ->{where(:approved => true)} before_create :set_expire