small fix for dates
This commit is contained in:
parent
b4ddea2aca
commit
ac11037166
|
@ -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}
|
||||
|
|
|
@ -110,8 +110,8 @@ class Book
|
|||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')}' target='_blank'>#{p.send(t)}</a>" }
|
||||
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}
|
||||
|
|
Loading…
Reference in New Issue