diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index 81745cb..ed37674 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -51,7 +51,7 @@ class Bulletin # 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)} def update_user