Skip to content
Snippets Groups Projects
Commit 07de5eea authored by pabois's avatar pabois
Browse files

gestion des dates dans magazine

parent 1979260f
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
# keywords :text
# number :integer
# published :boolean default(FALSE)
# published_at :date
# published_at :datetime
# slug :string
# title :string
# created_at :datetime not null
......@@ -47,7 +47,7 @@ class Research::Journal::Volume < ApplicationRecord
end
def git_path(website)
"content/volumes/#{published_at.year}/#{published_at.strftime "%Y-%m-%d"}-#{slug}.html" if published_at
"content/volumes/#{published_at.year}/#{slug}/_index.html" if published_at
end
def git_dependencies(website)
......
class ChangeResearchJournalVolumePublishedType < ActiveRecord::Migration[6.1]
def change
change_column :research_journal_volumes, :published_at, :datetime
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_01_28_111528) do
ActiveRecord::Schema.define(version: 2022_01_31_163458) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
......@@ -435,7 +435,7 @@ ActiveRecord::Schema.define(version: 2022_01_28_111528) do
t.uuid "research_journal_id", null: false
t.string "title"
t.integer "number"
t.date "published_at"
t.datetime "published_at"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.text "description"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment