From 565f6f44e59e2cd9304727088ef9e1bf4c3525cf Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Wed, 20 Mar 2024 16:34:46 +0100 Subject: [PATCH] make private some methods --- app/models/export_template.rb | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/app/models/export_template.rb b/app/models/export_template.rb index b90a81a0e..52b983f7f 100644 --- a/app/models/export_template.rb +++ b/app/models/export_template.rb @@ -72,19 +72,6 @@ class ExportTemplate < ApplicationRecord tiptap.to_path(content_for.deep_symbolize_keys, substitutions) end - - def folder(dossier) - render_attributes_for(content["default_dossier_directory"], dossier) - end - - def export_path(dossier) - File.join(folder(dossier), export_filename(dossier)) - end - - def export_filename(dossier) - "#{render_attributes_for(content["pdf_name"], dossier)}.pdf" - end - def specific_tags tags_categorized.slice(:individual, :etablissement, :dossier).values.flatten end @@ -117,6 +104,17 @@ class ExportTemplate < ApplicationRecord content_for_stable_id.symbolize_keys.fetch(:path) end + def folder(dossier) + render_attributes_for(content["default_dossier_directory"], dossier) + end + + def export_path(dossier) + File.join(folder(dossier), export_filename(dossier)) + end + + def export_filename(dossier) + "#{render_attributes_for(content["pdf_name"], dossier)}.pdf" + end def path(dossier, attachment, index, row_index) if attachment.name == 'pdf_export_for_instructeur'