Fix bug.
This commit is contained in:
parent
b8bc613d23
commit
915f63b468
|
@ -26,7 +26,7 @@ class Advising
|
|||
|
||||
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc",:award_date => "desc") }
|
||||
def display_year
|
||||
(I18n.locale.to_s == "zh_tw" ? (self.year > 1911 ? (self.year - 1911) : self.year ) : self.year)
|
||||
((self.year.present? && I18n.locale.to_s == "zh_tw") ? (self.year > 1911 ? (self.year - 1911) : self.year ) : self.year)
|
||||
end
|
||||
def display_advising_type
|
||||
(self.advising_type ? self.advising_type.title : "")
|
||||
|
|
Loading…
Reference in New Issue