From df3de0d46003b237c009f552ee55fff3d4f4e72c Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Thu, 6 Jan 2022 10:04:22 +0100
Subject: [PATCH] protected

---
 app/models/concerns/with_media.rb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/app/models/concerns/with_media.rb b/app/models/concerns/with_media.rb
index 30f0b3cd7..0387cea3f 100644
--- a/app/models/concerns/with_media.rb
+++ b/app/models/concerns/with_media.rb
@@ -13,6 +13,13 @@ module WithMedia
     blobs_with_ids [best_featured_image]
   end
 
+  # Can be overwrite to get featured_image from associated objects (ex: parents)
+  def best_featured_image(fallback: true)
+    featured_image
+  end
+
+  protected
+
   def rich_text_reflection_names
     @rich_text_reflection_names ||= _reflections.select { |name, reflection| reflection.class_name == "ActionText::RichText" }.keys
   end
@@ -23,13 +30,6 @@ module WithMedia
     }.flatten
   end
 
-  # Can be overwrite to get featured_image from associated objects (ex: parents)
-  def best_featured_image(fallback: true)
-    featured_image
-  end
-
-  protected
-
   def blobs_with_ids(ids)
     university.active_storage_blobs.where(id: ids.flatten.compact)
   end
-- 
GitLab