Update book.rb

fix error
This commit is contained in:
chiu 2019-11-12 22:23:52 +08:00
parent 25449e9803
commit d53e9a48c7
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ class Book
before_validation :add_http
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc", :publish_date => "desc", :publication_date => "desc") }
def book_paper_type
self.book_type.title rescue ""
end
def create_link
title = []
# title << self.member_profile.name if self.member_profile.present?