diff --git a/app/models/communication/website/permalink.rb b/app/models/communication/website/permalink.rb index 9cd67412359b19b16418b75d0ca17e88d8476ae8..e3dd63852e59c01510eb9ad0500f9b8cb7f93ac3 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 812cb8439217ba79f2a770b2d41a1838e8ad0c86..b03e273d10a3efa736c9dc0ceb6df9d9d20bf17a 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