From 8e75a188c80c11ca579abdc9f620ecebe3b8982b Mon Sep 17 00:00:00 2001 From: f Date: Fri, 2 Feb 2024 12:41:59 -0300 Subject: [PATCH] feat: eliminar el archivo si se elimina el blob --- app/lib/active_storage/service/jekyll_service.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/lib/active_storage/service/jekyll_service.rb b/app/lib/active_storage/service/jekyll_service.rb index 584bf06c..8ad46032 100644 --- a/app/lib/active_storage/service/jekyll_service.rb +++ b/app/lib/active_storage/service/jekyll_service.rb @@ -23,6 +23,14 @@ module ActiveStorage Pathname.new(path).dirname.basename.to_s end + # Elimina el archivo + # + # @param :key [String] + # @return [nil] + def delete(key) + FileUtils.rm_f(path_for(key)) + end + # Solo copiamos el archivo si no existe # # @param :key [String]