fix book language issue

This commit is contained in:
wmcheng 2019-08-12 01:39:32 +08:00
parent a52850a789
commit 461cc59b8d
1 changed files with 2 additions and 1 deletions

View File

@ -164,7 +164,8 @@ class Book
end
value = value.join(" / ")
when "language"
value = I18n.t("personal_book.#{self.language}") if !self.language.nil? rescue ""
value = I18n.t(self.language) if !self.language.nil? rescue ""
# value = I18n.t("personal_book.#{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"