added award date for sort

This commit is contained in:
Harry Bomrah 2016-04-11 17:56:13 +08:00
parent 6cd6549ac4
commit 5ab686b34e
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Honor
before_validation :add_http before_validation :add_http
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc") } scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc",:award_date => "desc") }
def slug_title def slug_title
self.award_name+' '+self.awarding_unit rescue "" self.award_name+' '+self.awarding_unit rescue ""