diff --git a/app/controllers/personal_books_controller.rb b/app/controllers/personal_books_controller.rb index 655b843..91d6400 100644 --- a/app/controllers/personal_books_controller.rb +++ b/app/controllers/personal_books_controller.rb @@ -34,8 +34,8 @@ class PersonalBooksController < ApplicationController end when "publish_date", "publication_date" pd = "" - if !book.publish_date.nil? - pd = book.publish_date.strftime("%Y-%m-%d").split('-') + if !book.publication_date.nil? + pd = book.publication_date.strftime("%Y-%m-%d").split('-') pd = pd[0]+"/"+pd[1] end t << {"value" => pd} diff --git a/app/models/book.rb b/app/models/book.rb index 694c99d..7b0a5b6 100644 --- a/app/models/book.rb +++ b/app/models/book.rb @@ -110,8 +110,8 @@ class Book pd_data << { "data_title" => "#{p.send(t)}" } when "publish_date", "publication_date" pd = "" - if !p.publish_date.nil? - pd = p.publish_date.strftime("%Y-%m-%d").split('-') + if !p.publication_date.nil? + pd = p.publication_date.strftime("%Y-%m-%d").split('-') pd = pd[0]+"/"+pd[1] end pd_data << {"data_title" => pd}