small fix again

This commit is contained in:
Harry Bomrah 2015-10-08 17:10:58 +08:00
parent f962120207
commit ce15f93d22
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class Bulletin
before_destroy :destroy_email 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)} scope :is_approved, ->{where(:approved => true)}
before_create :set_expire before_create :set_expire