From b4ddea2aca483608ac83d97c3f2890a878919690 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 6 Apr 2016 13:08:32 +0800 Subject: [PATCH] modified publication date --- app/controllers/personal_books_controller.rb | 2 +- app/models/book.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/personal_books_controller.rb b/app/controllers/personal_books_controller.rb index 28ec78b..655b843 100644 --- a/app/controllers/personal_books_controller.rb +++ b/app/controllers/personal_books_controller.rb @@ -32,7 +32,7 @@ class PersonalBooksController < ApplicationController else t << {"value" => "#{book.create_link}"} end - when "publish_date" + when "publish_date", "publication_date" pd = "" if !book.publish_date.nil? pd = book.publish_date.strftime("%Y-%m-%d").split('-') diff --git a/app/models/book.rb b/app/models/book.rb index c36a192..694c99d 100644 --- a/app/models/book.rb +++ b/app/models/book.rb @@ -108,7 +108,7 @@ class Book case t when "book_title", "extracted_chapters" pd_data << { "data_title" => "#{p.send(t)}" } - when "publish_date" + when "publish_date", "publication_date" pd = "" if !p.publish_date.nil? pd = p.publish_date.strftime("%Y-%m-%d").split('-')