diff --git a/app/helpers/admin/personal_books_helper.rb b/app/helpers/admin/personal_books_helper.rb index 87e6daa..622309b 100644 --- a/app/helpers/admin/personal_books_helper.rb +++ b/app/helpers/admin/personal_books_helper.rb @@ -1,13 +1,16 @@ module Admin::PersonalBooksHelper - def get_authors_text(book) + def get_authors_text(book) (book.authors.to_s.blank? ? get_member(book).collect(&:name).join('/') : Nokogiri::HTML(book.authors.to_s).text rescue '') end def get_authors_show(book) - (book.authors.to_s.blank? ? get_member(book).collect{|member| "#{member.name}"}.join('/') : book.authors.to_s rescue '') + (book.authors.to_s.blank? ? get_member_show(book) : book.authors.to_s) rescue '' end def get_member(book) Array(MemberProfile.find(Array(book).collect(&:member_profile_id))) end + def get_member_show(book) + get_member(book).collect{|member| "#{member.name}"}.join('/') + end def get_publisher(book) book.publisher end diff --git a/app/views/admin/books/_writing_book.html.erb b/app/views/admin/books/_writing_book.html.erb index 47dcd36..2b5065e 100644 --- a/app/views/admin/books/_writing_book.html.erb +++ b/app/views/admin/books/_writing_book.html.erb @@ -12,6 +12,6 @@ -