language removed if empty

This commit is contained in:
Harry Bomrah 2016-04-06 13:53:05 +08:00
parent ac11037166
commit 46c45a0f8c
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ class Book
end
value = value.join(" / ")
when "language"
value = I18n.t(self.language) rescue ""
value = I18n.t(self.language) if !self.language.nil? rescue ""
when "publish_date", "publication_date"
value = self.send(field).to_date.strftime("%Y-%m-%d") rescue nil
when "file"