From 94e205445b1c67f8dfd3a618102da77965fbe898 Mon Sep 17 00:00:00 2001 From: bohung Date: Tue, 23 Aug 2022 19:13:08 +0800 Subject: [PATCH] Updated. --- app/models/journal_paper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index 673124f..7093cf7 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -63,8 +63,9 @@ class JournalPaper # title << ( !self.journal_levels.blank? ? "(#{self.journal_levels.collect{|x| x.title}.join(', ')})" : nil) if !self.publication_date.nil? title << (self.publication_date.strftime("%b. %Y") rescue nil) + elsif self.year.present? + title << self.year end - # title << self.year title.delete(nil) title.join(', ').sub(/^\\s*,/,'').gsub(/,(\s*,)+/,',').strip end