From 295a00dee285394568d8b82a7f08a4cd98334b32 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Mon, 12 Dec 2022 12:12:17 +0100
Subject: [PATCH] test

---
 .../communication/website/permalink/program.rb     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 app/models/communication/website/permalink/program.rb

diff --git a/app/models/communication/website/permalink/program.rb b/app/models/communication/website/permalink/program.rb
new file mode 100644
index 000000000..f18b2591a
--- /dev/null
+++ b/app/models/communication/website/permalink/program.rb
@@ -0,0 +1,14 @@
+class Communication::Website::Permalink::Program < Communication::Website::Permalink
+  def self.required_in_config?(website)
+    website.has_education_programs?
+  end
+
+  def self.static_config_key
+    :programs
+  end
+
+  # /formations/:slug/
+  def self.pattern_in_website(website)
+    "#{website.special_page(:education_programs).path_without_language}:slug/"
+  end
+end
-- 
GitLab