is preview fixed

This commit is contained in:
nccu 2015-03-12 17:53:07 +08:00
parent aeb3fb3fdb
commit 47c8900a5d
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class Bulletin
# before_save :fetch_dept # before_save :fetch_dept
scope :can_display, ->{where(:is_hidden=>false).any_of({:postdate.lt=>Time.now, :deadline.gt=>Time.now},{:postdate.lt=>Time.now, :deadline=>nil}).order_by([: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])}
scope :is_approved, ->{where(:approved => true)} scope :is_approved, ->{where(:approved => true)}
def update_user def update_user