From 6f6d75e1eb908b267b98a4384913fc91357949d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Mon, 5 Dec 2022 15:19:38 +0100 Subject: [PATCH] fix --- app/models/communication/website/permalink.rb | 2 +- app/models/communication/website/permalink/post.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/communication/website/permalink.rb b/app/models/communication/website/permalink.rb index 9cd674123..e3dd63852 100644 --- a/app/models/communication/website/permalink.rb +++ b/app/models/communication/website/permalink.rb @@ -86,7 +86,7 @@ class Communication::Website::Permalink < ApplicationRecord def published_path p = pattern substitutions.each do |key, value| - p.gsub! ":#{key}", value + p.gsub! ":#{key}", "#{value}" end p end diff --git a/app/models/communication/website/permalink/post.rb b/app/models/communication/website/permalink/post.rb index 812cb8439..b03e273d1 100644 --- a/app/models/communication/website/permalink/post.rb +++ b/app/models/communication/website/permalink/post.rb @@ -21,9 +21,9 @@ class Communication::Website::Permalink::Post < Communication::Website::Permalin def substitutions { - year: about.published_at.year, - month: about.published_at.month, - day: about.published_at.day, + year: about.published_at.strftime("%Y"), + month: about.published_at.strftime("%m"), + day: about.published_at.strftime("%d"), slug: about.slug } end -- GitLab