From 39851a1497e252af88a01430bbc76e6b80325bc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com>
Date: Thu, 9 Dec 2021 15:47:08 +0100
Subject: [PATCH] use slug by default

---
 app/models/concerns/with_github_files.rb | 2 +-
 app/models/research/researcher.rb        | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/models/concerns/with_github_files.rb b/app/models/concerns/with_github_files.rb
index 5da22da8a..fb0ad047c 100644
--- a/app/models/concerns/with_github_files.rb
+++ b/app/models/concerns/with_github_files.rb
@@ -14,7 +14,7 @@ module WithGithubFiles
   end
 
   def github_path_generated
-    "_#{self.class.name.demodulize.pluralize.underscore}/#{self.id}.html"
+    "_#{self.class.name.demodulize.pluralize.underscore}/#{self.slug}.html"
   end
 
   def to_jekyll(github_file)
diff --git a/app/models/research/researcher.rb b/app/models/research/researcher.rb
index f80d439bf..941699607 100644
--- a/app/models/research/researcher.rb
+++ b/app/models/research/researcher.rb
@@ -36,9 +36,4 @@ class Research::Researcher < ApplicationRecord
   def to_s
     "#{ first_name } #{ last_name }"
   end
-
-  def github_path_generated
-    # Override from WithGithubFiles
-    "_authors/#{self.id}.md"
-  end
 end
-- 
GitLab