From 4d9688cdebf1c4916675b79a8a23d54896b769af Mon Sep 17 00:00:00 2001
From: pabois <pierreandre.boissinot@noesya.coop>
Date: Mon, 29 Jan 2024 17:24:58 +0100
Subject: [PATCH] naming

---
 app/helpers/application_helper.rb                           | 6 +++---
 .../communication/blocks/components/file/_edit.html.erb     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index fe73c7106..f26c463fe 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -69,7 +69,7 @@ module ApplicationHelper
     Rails.application.config.default_audio_formats.join(', ')
   end
 
-  def default_file_hint(filesize: number_to_human_size(Communication::Block::FILE_MAX_SIZE), formats: [])
+  def file_hint(filesize: number_to_human_size(Communication::Block::FILE_MAX_SIZE), formats: [])
     if formats.empty?
       t('file_hint_without_formats', filesize: filesize)
     else
@@ -78,11 +78,11 @@ module ApplicationHelper
   end
 
   def images_formats_accepted_hint(formats: default_images_formats_accepted)
-    default_file_hint(filesize: number_to_human_size(Communication::Block::IMAGE_MAX_SIZE), formats: formats)
+    file_hint(filesize: number_to_human_size(Communication::Block::IMAGE_MAX_SIZE), formats: formats)
   end
   
   def audio_formats_accepted_hint(formats: default_audio_formats_accepted)
-    default_file_hint(formats: formats)
+    file_hint(formats: formats)
   end
 
 end
diff --git a/app/views/admin/communication/blocks/components/file/_edit.html.erb b/app/views/admin/communication/blocks/components/file/_edit.html.erb
index 3af0c7dc2..ec26c7673 100644
--- a/app/views/admin/communication/blocks/components/file/_edit.html.erb
+++ b/app/views/admin/communication/blocks/components/file/_edit.html.erb
@@ -1,7 +1,7 @@
 <%
 label = t('admin.communication.blocks.components.file.input.label')
 remove = t('admin.communication.blocks.components.file.input.remove')
-hint = default_file_hint if hint.blank?
+hint = file_hint if hint.blank?
 accept ||= '*'
 %>
 <div class="mb-3">
-- 
GitLab