small fix again
This commit is contained in:
parent
f962120207
commit
ce15f93d22
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue