5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 17:56:21 +00:00

feat: eliminar el archivo si se elimina el blob

This commit is contained in:
f 2024-02-02 12:41:59 -03:00
parent 3cd483bb79
commit 8e75a188c8
No known key found for this signature in database

View file

@ -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]