diff --git a/app/models/book.rb b/app/models/book.rb index 63ea980..a67e0ba 100644 --- a/app/models/book.rb +++ b/app/models/book.rb @@ -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?