diff --git a/app/controllers/personal_books_controller.rb b/app/controllers/personal_books_controller.rb index f1e1bed..28ec78b 100644 --- a/app/controllers/personal_books_controller.rb +++ b/app/controllers/personal_books_controller.rb @@ -26,9 +26,9 @@ class PersonalBooksController < ApplicationController t = [] fields_to_show.each do |fs| case fs - when "book_title" + when "book_title", "extracted_chapters" if page.custom_string_field == "table" - t << {"value" => "#{book.book_title}"} + t << {"value" => "#{book.send(fs)}"} else t << {"value" => "#{book.create_link}"} end diff --git a/app/models/book.rb b/app/models/book.rb index d0a1c35..c36a192 100644 --- a/app/models/book.rb +++ b/app/models/book.rb @@ -106,8 +106,8 @@ class Book fields_to_show.collect do |t| if !page.nil? && page.custom_string_field == "table" case t - when "book_title" - pd_data << { "data_title" => "#{p.book_title}" } + when "book_title", "extracted_chapters" + pd_data << { "data_title" => "#{p.send(t)}" } when "publish_date" pd = "" if !p.publish_date.nil?